Add test case for joined pluck

39542fba54 (commitcomment-8938379)
This commit is contained in:
Sean Griffin 2014-12-11 14:54:03 -07:00
parent 39542fba54
commit 6cb956592c

@ -618,6 +618,13 @@ def test_calculation_with_polymorphic_relation
assert_equal part.id, ShipPart.joins(:trinkets).sum(:id)
end
def test_pluck_joined_with_polymorphic_relation
part = ShipPart.create!(name: "has trinket")
part.trinkets.create!
assert_equal [part.id], ShipPart.joins(:trinkets).pluck(:id)
end
def test_grouped_calculation_with_polymorphic_relation
part = ShipPart.create!(name: "has trinket")
part.trinkets.create!