diff options
author | lulalala <mark@goodlife.tw> | 2019-03-31 16:31:34 +0800 |
---|---|---|
committer | lulalala <mark@goodlife.tw> | 2019-03-31 22:59:12 +0800 |
commit | 655036b09a99daaa5b5f77777f23fc13829919b0 (patch) | |
tree | 81c412a18868b5b9a85ac487476b36ae0ce4407d /activerecord | |
parent | 8c8b0b670c680bc89e80e9dff9eb144c4a07e28a (diff) | |
download | rails-655036b09a99daaa5b5f77777f23fc13829919b0.tar.gz rails-655036b09a99daaa5b5f77777f23fc13829919b0.tar.bz2 rails-655036b09a99daaa5b5f77777f23fc13829919b0.zip |
Fix spec as generate_message is no longer called during validation
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/validations/i18n_validation_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/validations/i18n_validation_test.rb b/activerecord/test/cases/validations/i18n_validation_test.rb index 467f4b268a..2645776ab7 100644 --- a/activerecord/test/cases/validations/i18n_validation_test.rb +++ b/activerecord/test/cases/validations/i18n_validation_test.rb @@ -53,6 +53,7 @@ class I18nValidationTest < ActiveRecord::TestCase @topic.title = unique_topic.title assert_called_with(@topic.errors, :generate_message, [:title, :taken, generate_message_options.merge(value: "unique!")]) do @topic.valid? + @topic.errors.messages end end end @@ -62,6 +63,7 @@ class I18nValidationTest < ActiveRecord::TestCase Topic.validates_associated :replies, validation_options assert_called_with(replied_topic.errors, :generate_message, [:replies, :invalid, generate_message_options.merge(value: replied_topic.replies)]) do replied_topic.save + replied_topic.errors.messages end end end |