Fix order_with_totals_and_distribution by updating shipping fees

This commit is contained in:
luisramos0
2019-01-09 15:20:28 +00:00
parent 0eefd2455c
commit e45f7571fb

View File

@@ -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