mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Sort results to fix nondeterministic test failures
https://buildkite.com/rails/rails/builds/72395#933504f0-6ce1-4493-9742-f23d9b424aa0/979-990 https://buildkite.com/rails/rails/builds/72398#4448ae3f-71ba-4a6e-8fdb-499e94118b56/979-990 https://buildkite.com/rails/rails/builds/72421#db945faf-4344-40d8-b827-7b242973e243/989-1000 https://buildkite.com/rails/rails/builds/72420#414c9213-6287-4fd8-8c2d-02c0a6dd6f9c/1051-1062
This commit is contained in:
parent
1037f1cdf7
commit
aed6271d8e
1 changed files with 3 additions and 2 deletions
|
@ -171,9 +171,10 @@ module ActiveRecord
|
|||
treasure = Treasure.create!(name: "my_treasure")
|
||||
PriceEstimate.create!(estimate_of: treasure, price: 2, currency: "USD")
|
||||
|
||||
result = Treasure.joins(:price_estimates).where.not(price_estimates: { price: 2, currency: "USD" })
|
||||
expected = [treasures(:diamond), sapphire, sapphire]
|
||||
actual = Treasure.joins(:price_estimates).where.not(price_estimates: { price: 2, currency: "USD" })
|
||||
|
||||
assert_equal [treasures(:diamond), sapphire, sapphire], result
|
||||
assert_equal expected.sort_by(&:id), actual.sort_by(&:id)
|
||||
end
|
||||
|
||||
def test_polymorphic_nested_array_where
|
||||
|
|
Loading…
Reference in a new issue