Replace be_success on test_reponse with status 200

In rails 6 response.success? is not supported.
This commit is contained in:
Luis Ramos
2021-05-06 23:09:48 +01:00
parent f07cc32be0
commit 85508f45b4

View File

@@ -163,7 +163,7 @@ describe Spree::OrdersController, type: :controller do
it "does not complete the payment" do
get :show, params: { id: order.number, payment_intent: payment_intent }
expect(response).to be_success
expect(response.status).to eq 200
expect(flash[:error]).to eq("#{I18n.t("payment_could_not_process")}. error message")
payment.reload
expect(payment.cvv_response_message).to eq("https://stripe.com/redirect")