diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-11-29 16:52:59 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-29 17:53:03 -0500 |
commit | 00e3973a31181decc1b1574bf78bfa0226f0f04b (patch) | |
tree | 03296e66652abd9018cfb884ff33a638215b8ef6 /activerecord/test/cases/associations/has_one_associations_test.rb | |
parent | f64e2eb83c584ab4a1cac714c2162415ed80711a (diff) | |
download | rails-00e3973a31181decc1b1574bf78bfa0226f0f04b.tar.gz rails-00e3973a31181decc1b1574bf78bfa0226f0f04b.tar.bz2 rails-00e3973a31181decc1b1574bf78bfa0226f0f04b.zip |
Remove deprecated i18n scopes in Active Record
Diffstat (limited to 'activerecord/test/cases/associations/has_one_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_one_associations_test.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb index 48fbc5990c..4b14dca278 100644 --- a/activerecord/test/cases/associations/has_one_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_associations_test.rb @@ -186,25 +186,6 @@ class HasOneAssociationsTest < ActiveRecord::TestCase assert firm.account.present? end - def test_restrict_with_error_is_deprecated_using_key_one - I18n.backend = I18n::Backend::Simple.new - I18n.backend.store_translations :en, activerecord: { errors: { messages: { restrict_dependent_destroy: { one: "message for deprecated key" } } } } - - firm = RestrictedWithErrorFirm.create!(name: "restrict") - firm.create_account(credit_limit: 10) - - assert_not_nil firm.account - - assert_deprecated { firm.destroy } - - assert !firm.errors.empty? - assert_equal "message for deprecated key", firm.errors[:base].first - assert RestrictedWithErrorFirm.exists?(name: "restrict") - assert firm.account.present? - ensure - I18n.backend.reload! - end - def test_restrict_with_error firm = RestrictedWithErrorFirm.create!(name: "restrict") firm.create_account(credit_limit: 10) |