mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Adapt factory completed_order_with_fees to new parent order_with_totals_and_distribution by cleaning up duplicate shipping fees
This commit is contained in:
@@ -432,6 +432,7 @@ FactoryBot.define do
|
||||
create(:payment, order: order, amount: order.total, payment_method: payment_method, state: 'checkout')
|
||||
|
||||
while !order.completed? do break unless order.next! end
|
||||
order.updater.update_adjustments # this is required to clean up duplicated shipping fees
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user