Skip to content

Commit 60321f5

Browse files
authored
Merge pull request rails#55729 from yahonda/address-flaky-deprecated-has-and-belongs-to-many-assosiations-test
Fix nondeterministic behavior in DeprecatedHasAndBelongsToManyAssociationsTest
2 parents 0981530 + 05f8809 commit 60321f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ class DeprecatedHasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
10141014
end
10151015

10161016
assert_deprecated_association(:deprecated_posts, context: context_for_method(:deprecated_posts)) do
1017-
assert_equal @category.posts, @category.deprecated_posts
1017+
assert_equal @category.posts.order(:id), @category.deprecated_posts.order(:id)
10181018
end
10191019
end
10201020

0 commit comments

Comments
 (0)