diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-11-26 11:08:57 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-11-26 11:08:57 +0900 |
commit | 82fc7cdef59ea4714a11ef5ae12c2f776f73e154 (patch) | |
tree | 0666e4f557a892d80929c34190aab2c00cfa9d1a /activerecord/test/cases | |
parent | bbe1a9bcbacbdaf1beeb8983b7bf6fd38c4515a7 (diff) | |
download | rails-82fc7cdef59ea4714a11ef5ae12c2f776f73e154.tar.gz rails-82fc7cdef59ea4714a11ef5ae12c2f776f73e154.tar.bz2 rails-82fc7cdef59ea4714a11ef5ae12c2f776f73e154.zip |
Fix random CI failure due to non-deterministic sorting order
https://travis-ci.org/rails/rails/jobs/459534536#L1280
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index d13e1a86e9..6024a9e354 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -2002,8 +2002,8 @@ class HasManyAssociationsTest < ActiveRecord::TestCase end def test_has_many_through_respects_hash_conditions - assert_equal authors(:david).hello_posts, authors(:david).hello_posts_with_hash_conditions - assert_equal authors(:david).hello_post_comments, authors(:david).hello_post_comments_with_hash_conditions + assert_equal authors(:david).hello_posts.sort_by(&:id), authors(:david).hello_posts_with_hash_conditions.sort_by(&:id) + assert_equal authors(:david).hello_post_comments.sort_by(&:id), authors(:david).hello_post_comments_with_hash_conditions.sort_by(&:id) end def test_include_uses_array_include_after_loaded |