mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Fix order_with_totals_and_distribution by updating shipping fees
This commit is contained in:
@@ -303,6 +303,9 @@ FactoryBot.define do
|
||||
p = create(:simple_product, distributors: [order.distributor])
|
||||
FactoryBot.create(:line_item_with_shipment, shipping_fee: proxy.shipping_fee, order: order, product: p)
|
||||
order.reload
|
||||
|
||||
# this will update order shipping fees and also order totals (through order.update!)
|
||||
order.update_shipping_fees!
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user