Update line item adjustments spec

The `adjustable` and `source` associations are basically the same now, and we'll be deleting the latter soon.
This commit is contained in:
Matt-Yorkley
2021-03-19 17:53:19 +00:00
parent 593764851f
commit 28ee6a66a0

View File

@@ -790,8 +790,9 @@ describe Spree::Order do
it "removes the variant's adjustment" do
line_item = order.line_items.where(variant_id: v1.id).first
adjustment_scope = Spree::Adjustment.where(source_type: "Spree::LineItem",
source_id: line_item.id)
adjustment_scope = Spree::Adjustment.where(adjustable_type: "Spree::LineItem",
adjustable_id: line_item.id)
expect(adjustment_scope.count).to eq(1)
adjustment = adjustment_scope.first
order.remove_variant v1