A few more removals of stripe connect related code

This commit is contained in:
Luis Ramos
2021-07-24 23:17:42 +01:00
committed by Nihal
parent f90e34bb47
commit 0c240cee9a
6 changed files with 8 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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