From 428656e92ecf61d2ce1e9a3e69c82d7be20372fa Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 14 Mar 2019 21:57:02 +0000 Subject: [PATCH] Add distributor to shipping method in factory completed_order_with_fees so that shipping method is not discarded during order processing in package.shipping_methods --- spec/factories.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories.rb b/spec/factories.rb index f3f730c00c..5c178d0a78 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -427,7 +427,7 @@ FactoryBot.define do payment_method = create(:payment_method, calculator: payment_calculator) create(:payment, order: order, amount: order.total, payment_method: payment_method, state: 'checkout') - create(:shipping_method_with, :shipping_fee, shipping_fee: evaluator.shipping_fee) + create(:shipping_method_with, :shipping_fee, shipping_fee: evaluator.shipping_fee, distributors: [order.distributor]) order.reload while !order.completed? do break unless order.next! end