mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user