From 706b854d8c73117f197e9a2039276b047f116e62 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Wed, 7 Apr 2021 23:38:56 +0100 Subject: [PATCH] Fix rspec syntax --- spec/requests/checkout/paypal_spec.rb | 2 +- spec/requests/checkout/stripe_connect_spec.rb | 18 +++++++++--------- spec/requests/checkout/stripe_sca_spec.rb | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/spec/requests/checkout/paypal_spec.rb b/spec/requests/checkout/paypal_spec.rb index d0017db605..c8ebbd7585 100644 --- a/spec/requests/checkout/paypal_spec.rb +++ b/spec/requests/checkout/paypal_spec.rb @@ -55,7 +55,7 @@ describe "checking out an order with a paypal express payment method", type: :re expect(order.all_adjustments.payment_fee.count).to eq 1 expect(order.all_adjustments.payment_fee.first.amount).to eq 1.5 - get spree.confirm_paypal_path, params + get spree.confirm_paypal_path, params: params # Processing was successful, order is complete expect(response).to redirect_to order_path(order, token: order.token) diff --git a/spec/requests/checkout/stripe_connect_spec.rb b/spec/requests/checkout/stripe_connect_spec.rb index 63eea0e5c8..9a01b28511 100644 --- a/spec/requests/checkout/stripe_connect_spec.rb +++ b/spec/requests/checkout/stripe_connect_spec.rb @@ -102,7 +102,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re context "and the charge request is successful" do it "should process the payment without storing card details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -124,7 +124,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -159,7 +159,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re context "and the store, token and charge requests are successful" do it "should process the payment, and stores the card/customer details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -181,7 +181,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -197,7 +197,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -213,7 +213,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re # Note, no requests have been stubbed it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -261,7 +261,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re context "and the charge and token requests are accepted" do it "should process the payment, and keep the profile ids and other card details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -283,7 +283,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -298,7 +298,7 @@ describe "checking out an order with a Stripe Connect payment method", type: :re end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 diff --git a/spec/requests/checkout/stripe_sca_spec.rb b/spec/requests/checkout/stripe_sca_spec.rb index 49c99b7ce0..5b1df19196 100644 --- a/spec/requests/checkout/stripe_sca_spec.rb +++ b/spec/requests/checkout/stripe_sca_spec.rb @@ -128,7 +128,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques context "and the payment intent request is successful" do it "should process the payment without storing card details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -150,7 +150,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -216,7 +216,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques context "and the customer, payment_method and payment_intent requests are successful" do it "should process the payment, and store the card/customer details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -238,7 +238,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -254,7 +254,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -269,7 +269,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -301,7 +301,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques context "and the payment intent and payment method requests are accepted" do it "should process the payment, and keep the profile ids and other card details" do - put update_checkout_path, params + put update_checkout_path, params: params expect(json_response["path"]).to eq order_path(order) expect(order.payments.completed.count).to be 1 @@ -323,7 +323,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "should not process the payment" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 400 @@ -344,7 +344,7 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques end it "redirects the user to the authorization stripe url" do - put update_checkout_path, params + put update_checkout_path, params: params expect(response.status).to be 200 expect(response.body).to include stripe_redirect_url