diff options
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 9fedd84c73..925a68da91 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -97,6 +97,12 @@ class ValidationsTest < ActiveModel::TestCase assert_equal 2, r.errors.count end + def test_errors_empty_after_errors_on_check + t = Topic.new + assert t.errors[:id].empty? + assert t.errors.empty? + end + def test_validates_each hits = 0 Topic.validates_each(:title, :content, [:title, :content]) do |record, attr| |