From 93c65ae4efd62933618193c088ed1dadef47793d Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Wed, 9 Aug 2017 12:59:49 +0300 Subject: Fix random CI failure due to non-deterministic sorting order ``` rails/activerecord$ bundle exec rake postgresql:test --verbose TESTOPTS="--seed=36062" Failure: AssociationsJoinModelTest#test_has_many_through_polymorphic_has_one [/home/travis/build/rails/rails/activerecord/test/cases/associations/join_model_test.rb:407]: --- expected +++ actual @@ -1 +1 @@ -[ #, # ] +#, # ]> ``` --- activerecord/test/cases/associations/join_model_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/associations/join_model_test.rb') diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 2f68bc5141..9d3d5353ff 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -404,7 +404,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase end def test_has_many_through_polymorphic_has_one - assert_equal Tagging.find(1, 2).sort_by(&:id), authors(:david).taggings_2 + assert_equal Tagging.find(1, 2).sort_by(&:id), authors(:david).taggings_2.sort_by(&:id) end def test_has_many_through_polymorphic_has_many -- cgit v1.2.3