From e45f7571fbdb9fbc386b3ea8e38428e190672b74 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 9 Jan 2019 15:20:28 +0000 Subject: [PATCH] Fix order_with_totals_and_distribution by updating shipping fees --- spec/factories.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/factories.rb b/spec/factories.rb index 58273f7cb5..df027dfbaf 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -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