mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Call full_messages
instead of to_a
in its spec.
This commit is contained in:
parent
a7776924a6
commit
703b6387ee
1 changed files with 1 additions and 2 deletions
|
@ -161,7 +161,7 @@ class ErrorsTest < ActiveModel::TestCase
|
|||
person = Person.new
|
||||
person.errors.add(:name, "can not be blank")
|
||||
person.errors.add(:name, "can not be nil")
|
||||
assert_equal ["name can not be blank", "name can not be nil"], person.errors.to_a
|
||||
assert_equal ["name can not be blank", "name can not be nil"], person.errors.full_messages
|
||||
end
|
||||
|
||||
test 'full_message should return the given message if attribute equals :base' do
|
||||
|
@ -240,4 +240,3 @@ class ErrorsTest < ActiveModel::TestCase
|
|||
person.errors.add_on_blank :name, :message => 'custom'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue