diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-11-10 23:43:11 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-11-10 23:43:11 +0900 |
commit | d6e86f17732e67ecc04870af1fb9a4eaaf0f3e1b (patch) | |
tree | dff9c23f8d2a96b126489eac28fd35a8c32c5e74 /activerecord/test | |
parent | b1e068bd30a88fbcc93a835edd6dbacf1d2d251c (diff) | |
download | rails-d6e86f17732e67ecc04870af1fb9a4eaaf0f3e1b.tar.gz rails-d6e86f17732e67ecc04870af1fb9a4eaaf0f3e1b.tar.bz2 rails-d6e86f17732e67ecc04870af1fb9a4eaaf0f3e1b.zip |
Fix random CI failure due to non-deterministic sorting order
https://travis-ci.org/rails/rails/jobs/300163487#L1974
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index e44533cf60..eec43ef79e 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -204,7 +204,7 @@ class RelationTest < ActiveRecord::TestCase def test_finding_with_subquery_with_eager_loading_in_where relation = Comment.includes(:post).where("posts.type": "Post") - assert_equal relation.to_a, Comment.where(id: relation).to_a + assert_equal relation.sort_by(&:id), Comment.where(id: relation).sort_by(&:id) end def test_finding_with_conditions |