From f67ddb0ffebb6e3e2bb88536c27975a4cc92de55 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 17 Jul 2016 15:46:59 +0530 Subject: Fix one more test randomly failing due to array ordering issue on PG adapter Reproduction command - ARCONN=postgresql be ruby -w -Itest test/cases/autosave_association_test.rb --seed 34101 --- activerecord/test/cases/autosave_association_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 2203aa1788..f72a9520e0 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1370,7 +1370,7 @@ module AutosaveAssociationOnACollectionAssociationTests @pirate.send(@association_name).each_with_index { |child, i| child.name = new_names[i] } @pirate.save - assert_equal new_names, @pirate.reload.send(@association_name).map(&:name) + assert_equal new_names.sort, @pirate.reload.send(@association_name).map(&:name).sort end def test_should_automatically_save_bang_the_associated_models @@ -1378,7 +1378,7 @@ module AutosaveAssociationOnACollectionAssociationTests @pirate.send(@association_name).each_with_index { |child, i| child.name = new_names[i] } @pirate.save! - assert_equal new_names, @pirate.reload.send(@association_name).map(&:name) + assert_equal new_names.sort, @pirate.reload.send(@association_name).map(&:name).sort end def test_should_update_children_when_autosave_is_true_and_parent_is_new_but_child_is_not -- cgit v1.2.3