diff options
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r-- | activemodel/test/cases/validations/i18n_validation_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations/i18n_validation_test.rb b/activemodel/test/cases/validations/i18n_validation_test.rb index 1cec15110e..d061b5642c 100644 --- a/activemodel/test/cases/validations/i18n_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_validation_test.rb @@ -61,6 +61,12 @@ class I18nValidationTest < ActiveModel::TestCase @person.errors.full_messages end + def test_errors_full_messages_uses_format + I18n.backend.store_translations('en', :activemodel => {:errors => {:format => "Field {{attribute}} {{message}}"}}) + @person.errors.add('name', 'empty') + assert_equal ["Field Name empty"], @person.errors.full_messages + end + # ActiveRecord::Validations # validates_confirmation_of w/ mocha def test_validates_confirmation_of_generates_message |