diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2018-02-26 11:25:45 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2018-02-26 11:25:45 -0700 |
commit | c2a2b84d8d9185127d59a4760efb7356aea25af1 (patch) | |
tree | 83c955338a10cda4583675e64dd73fe719a5de9b /activerecord/test | |
parent | 948b931925febac3c965ab13470065ced68f7b53 (diff) | |
download | rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.tar.gz rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.tar.bz2 rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.zip |
Ensure we don't write virtual attributes on update, too
See 948b931925febac3c965ab13470065ced68f7b53 for context
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index d1a7366f5f..0791811d94 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -748,7 +748,10 @@ class DirtyTest < ActiveRecord::TestCase record = klass.new(first_name: "Sean") record.non_persisted_attribute_will_change! - assert_predicate record, :non_persisted_attribute_changed? + assert record.save + + record.non_persisted_attribute_will_change! + assert record.save ensure ActiveRecord::Base.partial_writes = original_partial_writes |