Fix checkout spec due to shipments

This commit is contained in:
Pau Perez
2018-11-16 18:23:28 +01:00
parent 0052d571b9
commit 23421758fa

View File

@@ -223,7 +223,8 @@ describe CheckoutController, type: :controller do
let!(:payment_failed) { create(:payment, order: order, state: 'failed') }
before do
order.update_attribute(:shipping_method_id, shipment_pending.shipping_method_id)
order.shipments << shipment_pending
order.save
controller.instance_variable_set(:@order, order.reload)
end