Update Order#finalize! to include all adjustments

This commit is contained in:
Matt-Yorkley
2021-02-14 15:06:11 +00:00
parent c0b33de0f0
commit aa16c64f20
2 changed files with 2 additions and 2 deletions

View File

@@ -423,7 +423,7 @@ module Spree
def finalize!
touch :completed_at
adjustments.update_all state: 'closed'
all_adjustments.update_all state: 'closed'
# update payment and shipment(s) states, and save
updater.update_payment_state

View File

@@ -181,7 +181,7 @@ describe Spree::Order do
allow(order).to receive :has_available_shipment
allow(Spree::OrderMailer).to receive_message_chain :confirm_email, :deliver_later
adjustments = double
allow(order).to receive_messages adjustments: adjustments
allow(order).to receive_messages all_adjustments: adjustments
expect(adjustments).to receive(:update_all).with(state: 'closed')
order.finalize!
end