diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-19 12:22:46 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-19 12:22:46 +0900 |
commit | 274a9c772f90d3f9161a265243818e81b1a08461 (patch) | |
tree | eb3266c0a3eaf2f9e911c87972573ae918a884f6 | |
parent | dc796a0d407dfaf84abd464fc1aa2966cddb51e0 (diff) | |
download | rails-274a9c772f90d3f9161a265243818e81b1a08461.tar.gz rails-274a9c772f90d3f9161a265243818e81b1a08461.tar.bz2 rails-274a9c772f90d3f9161a265243818e81b1a08461.zip |
Address intermittent CI failure due to non-determined sort order
https://travis-ci.org/rails/rails/jobs/417783260#L1173-L1179
-rw-r--r-- | activerecord/test/cases/serialized_attribute_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb index 4cd4515c3b..1192b30b14 100644 --- a/activerecord/test/cases/serialized_attribute_test.rb +++ b/activerecord/test/cases/serialized_attribute_test.rb @@ -322,7 +322,7 @@ class SerializedAttributeTest < ActiveRecord::TestCase topic = Topic.create!(content: {}) topic2 = Topic.create!(content: nil) - assert_equal [topic, topic2], Topic.where(content: nil) + assert_equal [topic, topic2], Topic.where(content: nil).sort_by(&:id) end def test_nil_is_always_persisted_as_null |