Skip to content

Commit 1c2468f

Browse files
authored
Merge pull request rails#43649 from DmitryTsepelev/flaky-spec-for-associations
Fix flaky test in HasManyThroughDisableJoinsAssociationsTest
2 parents 32228ff + 5d212a5 commit 1c2468f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/test/models/author.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def ratings
5353

5454
has_many :ratings, through: :comments
5555
has_many :good_ratings,
56-
-> { where("ratings.value > 5") },
56+
-> { where("ratings.value > 5").order(:id) },
5757
through: :comments,
5858
source: :ratings
5959

6060
has_many :no_joins_ratings, through: :no_joins_comments, disable_joins: :true, source: :ratings
6161
has_many :no_joins_good_ratings,
62-
-> { where("ratings.value > 5") },
62+
-> { where("ratings.value > 5").order(:id) },
6363
through: :comments,
6464
source: :ratings,
6565
disable_joins: true

0 commit comments

Comments
 (0)