diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index 6e2e25cc86..1494b0cc92 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -203,7 +203,6 @@ Layout/LineLength: - spec/models/spree/address_spec.rb - spec/models/spree/adjustment_spec.rb - spec/models/spree/classification_spec.rb - - spec/models/spree/gateway/stripe_connect_spec.rb - spec/models/spree/inventory_unit_spec.rb - spec/models/spree/line_item_spec.rb - spec/models/spree/order/checkout_spec.rb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a643372650..581af643b0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -622,7 +622,6 @@ Style/NumericPredicate: - 'app/helpers/shared_helper.rb' - 'app/models/product_import/product_importer.rb' - 'app/models/product_import/spreadsheet_entry.rb' - - 'app/models/spree/gateway/stripe_connect.rb' - 'app/models/spree/line_item.rb' - 'app/models/spree/order.rb' - 'app/models/spree/order_contents.rb' @@ -698,7 +697,6 @@ Style/Send: - 'spec/models/calculator/weight_spec.rb' - 'spec/models/enterprise_spec.rb' - 'spec/models/exchange_spec.rb' - - 'spec/models/spree/gateway/stripe_connect_spec.rb' - 'spec/models/spree/order_inventory_spec.rb' - 'spec/models/spree/order_spec.rb' - 'spec/models/spree/payment_spec.rb' diff --git a/knapsack_rspec_report.json b/knapsack_rspec_report.json index 4324cbcf86..2940d5baf4 100644 --- a/knapsack_rspec_report.json +++ b/knapsack_rspec_report.json @@ -17,7 +17,6 @@ "spec/controllers/line_items_controller_spec.rb": 9.073998928070068, "spec/lib/open_food_network/address_finder_spec.rb": 8.379472494125366, "spec/features/admin/enterprises/index_spec.rb": 4.946447134017944, - "spec/requests/checkout/stripe_connect_spec.rb": 7.5777587890625, "spec/models/spree/adjustment_spec.rb": 7.560959815979004, "spec/serializers/api/product_serializer_spec.rb": 8.135705709457397, "spec/lib/open_food_network/permissions_spec.rb": 3.799001455307007, @@ -233,7 +232,6 @@ "spec/lib/tasks/enterprises_rake_spec.rb": 0.0833287239074707, "spec/controllers/api/taxonomies_controller_spec.rb": 0.08802604675292969, "spec/helpers/spree/admin/orders_helper_spec.rb": 0.0646059513092041, - "spec/models/spree/gateway/stripe_connect_spec.rb": 0.05724668502807617, "spec/helpers/shop_helper_spec.rb": 0.3690376281738281, "spec/jobs/welcome_enterprise_job_spec.rb": 0.08383440971374512, "spec/jobs/confirm_order_job_spec.rb": 0.06512808799743652, diff --git a/spec/helpers/enterprises_helper_spec.rb b/spec/helpers/enterprises_helper_spec.rb index bfd331b4ac..7029ede7c3 100644 --- a/spec/helpers/enterprises_helper_spec.rb +++ b/spec/helpers/enterprises_helper_spec.rb @@ -262,14 +262,14 @@ describe EnterprisesHelper, type: :helper do end end - context "when StripeConnect payment methods are present" do + context "when Stripe payment methods are present" do let!(:pm3) { create(:stripe_sca_payment_method, distributors: [distributor], - preferred_enterprise_id: distributor.id) + preferred_enterprise_id: distributor.id) } let!(:pm4) { create(:stripe_sca_payment_method, distributors: [distributor], - preferred_enterprise_id: some_other_distributor.id) + preferred_enterprise_id: some_other_distributor.id) } let(:available_payment_methods) { helper.available_payment_methods } diff --git a/spec/jobs/subscription_confirm_job_spec.rb b/spec/jobs/subscription_confirm_job_spec.rb index d5a6db2ca5..ca93fc0f23 100644 --- a/spec/jobs/subscription_confirm_job_spec.rb +++ b/spec/jobs/subscription_confirm_job_spec.rb @@ -194,17 +194,17 @@ describe SubscriptionConfirmJob do context "Stripe Connect" do let(:stripe_sca_payment_method) { create(:stripe_sca_payment_method) } let(:stripe_sca_payment) { - create(:payment, amount: 10, payment_method: stripe_connect_payment_method) + create(:payment, amount: 10, payment_method: stripe_sca_payment_method) } before do allow(order).to receive(:pending_payments) { [stripe_sca_payment] } - allow(stripe_connect_payment_method).to receive(:purchase) { true } + allow(stripe_sca_payment_method).to receive(:purchase) { true } end it "runs the charges in offline mode" do job.send(:confirm_order!, order) - expect(stripe_connect_payment_method).to have_received(:purchase) + expect(stripe_sca_payment_method).to have_received(:purchase) end end end diff --git a/spec/models/spree/gateway_tagging_spec.rb b/spec/models/spree/gateway_tagging_spec.rb index 35b08ae9bb..410ef1ec35 100644 --- a/spec/models/spree/gateway_tagging_spec.rb +++ b/spec/models/spree/gateway_tagging_spec.rb @@ -45,9 +45,9 @@ module Spree it_behaves_like "taggable", "Spree::PaymentMethod" end - describe Gateway::StripeConnect do + describe Gateway::StripeSCA do subject do - # StripeConnect needs an owner to be valid. + # StripeSCA needs an owner to be valid. valid_subject.tap { |m| m.preferred_enterprise_id = shop.id } end