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

This commit is contained in:
luisramos0
2019-03-14 21:57:02 +00:00
parent beb19cdc8a
commit 428656e92e

View File

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