1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Eugene Kenny 2020-10-30 16:05:55 +00:00
parent 1037f1cdf7
commit aed6271d8e

View file

@ -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