In restart checkout spec, create failed payment before the valid payment otherwise the failed payment will invalidate the previous payment, even if it is a good one

In spree 2, every new payment will invalidate all previous payments in the order
See here: c9eebba4f7
This commit is contained in:
luisramos0
2018-12-21 15:09:42 +00:00
parent 7155f28acf
commit 8970131685

View File

@@ -13,8 +13,8 @@ describe RestartCheckout do
context "when the order is in a subsequent state" do
let!(:shipment_pending) { create(:shipment, order: order, state: 'pending') }
let!(:payment_checkout) { create(:payment, order: order, state: 'checkout') }
let!(:payment_failed) { create(:payment, order: order, state: 'failed') }
let!(:payment_checkout) { create(:payment, order: order, state: 'checkout') }
before do
order.update_attribute(:state, "payment")