From 28ee6a66a0aac30ab480d32c9f79d96febd59b6e Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 19 Mar 2021 17:53:19 +0000 Subject: [PATCH] Update line item adjustments spec The `adjustable` and `source` associations are basically the same now, and we'll be deleting the latter soon. --- spec/models/spree/order_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/models/spree/order_spec.rb b/spec/models/spree/order_spec.rb index dbd8f179a1..5d32843056 100644 --- a/spec/models/spree/order_spec.rb +++ b/spec/models/spree/order_spec.rb @@ -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