From 282acd256b3d1105eb29b7f99c06ed279a83d3e3 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 29 Apr 2024 19:49:05 +0100 Subject: [PATCH] Undoes changes: removes unecessary test --- spec/controllers/checkout_controller_spec.rb | 25 -------------------- 1 file changed, 25 deletions(-) diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb index 80e69d4a14..7c4a158e4d 100644 --- a/spec/controllers/checkout_controller_spec.rb +++ b/spec/controllers/checkout_controller_spec.rb @@ -10,9 +10,6 @@ RSpec.describe CheckoutController, type: :controller do let(:exchange) { order_cycle.exchanges.outgoing.first } let(:order) { create(:order_with_line_items, line_items_count: 1, distributor:, order_cycle:) } let(:payment_method) { distributor.payment_methods.first } - let(:stripe_payment_method) { - create(:stripe_sca_payment_method, distributor_ids: [distributor.id], environment: Rails.env) - } let(:shipping_method) { distributor.shipping_methods.first } before do @@ -290,7 +287,6 @@ RSpec.describe CheckoutController, type: :controller do expect(response).to redirect_to checkout_step_path(:summary) expect(order.reload.state).to eq "confirmation" - expect(response.status).to be 302 end describe "with a voucher" do @@ -312,27 +308,6 @@ RSpec.describe CheckoutController, type: :controller do end end - context "with no payment source" do - let(:checkout_params) do - { - order: { - payments_attributes: [ - { payment_method_id: stripe_payment_method.id } - ] - } - } - end - - it "updates and redirects to summary step" do - put(:update, params:) - - expect(response).to redirect_to checkout_step_path(:summary) - expect(order.reload.state).to eq "confirmation" - expect(order.payments.first.source).to eq nil - expect(response.status).to be 302 - end - end - context "with payment fees" do let(:payment_method_with_fee) do create(:payment_method, :flat_rate, amount: "1.23", distributors: [distributor])