From 231f01dad2218f4870452b3714a2055a2dba640f Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Sat, 8 May 2021 15:03:23 -0700 Subject: [PATCH] fix order adjustments spec --- spec/models/spree/order_spec.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/models/spree/order_spec.rb b/spec/models/spree/order_spec.rb index eeee3baf175..20bd80cdfcd 100644 --- a/spec/models/spree/order_spec.rb +++ b/spec/models/spree/order_spec.rb @@ -1141,12 +1141,8 @@ end context "when finalized fee adjustments exist on the order" do - let(:payment_fee_adjustment) { order.all_adjustments.payment_fee.first } - let(:shipping_fee_adjustment) { order.shipment_adjustments.first } - before do - payment_fee_adjustment.finalize! - shipping_fee_adjustment.finalize! + order.all_adjustments.each(&:finalize!) order.reload end @@ -1155,6 +1151,7 @@ # Check if fees got updated order.reload + expect(order.adjustment_total).to eq expected_fees expect(order.shipment.adjustments.tax.inclusive.sum(:amount)).to eq 1.2 expect(order.shipment.included_tax_total).to eq 1.2