diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-08-09 16:26:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 16:26:38 -0400 |
commit | 54ed5270c5b696ea14f4e2251b8ea0e0ac2c4dfa (patch) | |
tree | 39c077414bfd472fc325c9c5a2ef8a348aae0cf1 | |
parent | e5fb6ed62b1789ac71fef6a94c57c65097bd45aa (diff) | |
parent | c78b672beba10f720e4e59cdc79e42cb79b9b811 (diff) | |
download | rails-54ed5270c5b696ea14f4e2251b8ea0e0ac2c4dfa.tar.gz rails-54ed5270c5b696ea14f4e2251b8ea0e0ac2c4dfa.tar.bz2 rails-54ed5270c5b696ea14f4e2251b8ea0e0ac2c4dfa.zip |
Merge pull request #30170 from bogdanvlviv/fix_random_ci_failure_ar_dirty
Fix random CI failure DirtyTest
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index fb3d691d51..a602f83d8c 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -466,11 +466,10 @@ class DirtyTest < ActiveRecord::TestCase def test_save_should_not_save_serialized_attribute_with_partial_writes_if_not_present with_partial_writes(Topic) do - Topic.create!(author_name: "Bill", content: { a: "a" }) - topic = Topic.select("id, author_name").first + topic = Topic.create!(author_name: "Bill", content: { a: "a" }) + topic = Topic.select("id, author_name").find(topic.id) topic.update_columns author_name: "John" - topic = Topic.first - assert_not_nil topic.content + assert_not_nil topic.reload.content end end |