Skip to content

Commit

Permalink
Merge pull request #7589 from andrewpbrett/order-adjustments-spec
Browse files Browse the repository at this point in the history
[Rails 6.0] Fix order adjustments spec
  • Loading branch information
andrewpbrett authored May 9, 2021
2 parents a0476be + 231f01d commit cbefa5f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit cbefa5f

Please sign in to comment.