1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix random CI failure due to non-deterministic sorting order

https://travis-ci.org/rails/rails/jobs/300163487#L1974
This commit is contained in:
Ryuta Kamizono 2017-11-10 23:43:11 +09:00
parent b1e068bd30
commit d6e86f1773

View file

@ -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