mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update Order#finalize! to include all adjustments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user