Merge pull request #7355 from andrewpbrett/rspec-syntax

Update rspec syntax
This commit is contained in:
Matt-Yorkley
2021-04-08 20:01:48 +02:00
committed by GitHub
3 changed files with 19 additions and 19 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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