diff --git a/spec/controllers/spree/api/adyen_redirect_controller_spec.rb b/spec/controllers/spree/api/adyen_redirect_controller_spec.rb index 5fbae42b..c29e8861 100644 --- a/spec/controllers/spree/api/adyen_redirect_controller_spec.rb +++ b/spec/controllers/spree/api/adyen_redirect_controller_spec.rb @@ -107,11 +107,9 @@ merchant_reference: order.number) end - # there will already be a payment and source created at this point - before do - source = - create(:hpp_source, psp_reference: psp_reference, order: order) + let(:source) { create(:hpp_source, psp_reference: psp_reference, order: order) } + before do create(:hpp_payment, source: source, order: order) order.contents.advance