diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-07-17 15:46:59 +0530 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-04-26 22:59:35 -0700 |
commit | f67ddb0ffebb6e3e2bb88536c27975a4cc92de55 (patch) | |
tree | 41482270d3834fef87a7efdfc73df50ec384468f /activerecord | |
parent | 8d791b0370a0285fe6ef5346c12e5fd9444b02dc (diff) | |
download | rails-f67ddb0ffebb6e3e2bb88536c27975a4cc92de55.tar.gz rails-f67ddb0ffebb6e3e2bb88536c27975a4cc92de55.tar.bz2 rails-f67ddb0ffebb6e3e2bb88536c27975a4cc92de55.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |