diff options
Diffstat (limited to 'activemodel/test/cases/errors_test.rb')
-rw-r--r-- | activemodel/test/cases/errors_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 58aa7ee147..048b8a92fb 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -159,14 +159,14 @@ class ErrorsTest < ActiveModel::TestCase assert_equal :name, error.attribute assert_equal :blank, error.type - assert_equal error, person.errors.first + assert_equal error, person.errors.objects.first end test "add, with type as symbol" do person = Person.new person.errors.add(:name, :blank) - assert_equal :blank, person.errors.first.type + assert_equal :blank, person.errors.objects.first.type assert_equal ["can't be blank"], person.errors[:name] end @@ -183,7 +183,7 @@ class ErrorsTest < ActiveModel::TestCase person = Person.new person.errors.add(:name) - assert_equal :invalid, person.errors.first.type + assert_equal :invalid, person.errors.objects.first.type assert_equal ["is invalid"], person.errors[:name] end @@ -203,7 +203,7 @@ class ErrorsTest < ActiveModel::TestCase person = Person.new person.errors.add(:name, type) - assert_equal :blank, person.errors.first.type + assert_equal :blank, person.errors.objects.first.type assert_equal ["can't be blank"], person.errors[:name] end @@ -214,7 +214,7 @@ class ErrorsTest < ActiveModel::TestCase person = Person.new person.errors.add(:name, :blank, message: type) - assert_equal :blank, person.errors.first.type + assert_equal :blank, person.errors.objects.first.type assert_equal [msg], person.errors[:name] end @@ -225,7 +225,7 @@ class ErrorsTest < ActiveModel::TestCase person = Person.new person.errors.add(:name, message: type) - assert_equal :invalid, person.errors.first.type + assert_equal :invalid, person.errors.objects.first.type assert_equal [msg], person.errors[:name] end |