Skip to content

Commit

Permalink
Re-names payment; addresses style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
filipefurtad0 committed Feb 25, 2022
1 parent daffe33 commit 82b6d39
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions spec/system/consumer/split_checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@

describe "choosing" do
shared_examples "different payment methods" do |pay_method|

context "checking out with #{pay_method}", if: pay_method.eql?("Stripe SCA") == false do
before do
visit checkout_step_path(:payment)
Expand All @@ -313,7 +312,6 @@
expect(page).to have_content "Paying via: #{pay_method}"
expect(order.reload.state).to eq "complete"
end

end

context "for Stripe SCA", if: pay_method.eql?("Stripe SCA") do
Expand All @@ -330,14 +328,14 @@
end
end
end

describe "shared examples" do
let!(:payment_method3) { create(:payment_method, distributors: [distributor], name: "Cash") }
let!(:cash) { create(:payment_method, distributors: [distributor], name: "Cash") }

context "Cash" do
it_behaves_like "different payment methods", "Cash"
end

context "Paypal" do
let!(:paypal) do
Spree::Gateway::PayPalExpress.create!(
Expand All @@ -359,7 +357,7 @@

it_behaves_like "different payment methods", "Paypal"
end

context "Stripe SCA" do
let!(:stripe_account) { create(:stripe_account, enterprise: distributor) }
let!(:stripe_sca_payment_method) {
Expand Down

0 comments on commit 82b6d39

Please sign in to comment.