Remove payment method ApiCustomerCredit

This commit is contained in:
Gaetan Craig-Riou
2026-03-06 14:03:09 +11:00
parent 7790259c27
commit d5dec05ab1
8 changed files with 6 additions and 102 deletions

View File

@@ -1,15 +0,0 @@
# frozen_string_literal: true
require "spec_helper"
RSpec.describe Spree::PaymentMethod::ApiCustomerCredit do
subject { build(:api_customer_credit_payment_method) }
describe "#name" do
it { expect(subject.name).to eq("api_payment_method.name") }
end
describe "#description" do
it { expect(subject.description).to eq("api_payment_method.description") }
end
end

View File

@@ -80,18 +80,6 @@ RSpec.describe Spree::PaymentMethod do
end
end
describe "#internal" do
it "returns only internal payment method" do
external = create(:payment_method)
internal1 = create(:customer_credit_payment_method)
internal2 = create(:api_customer_credit_payment_method)
payment_methods = described_class.internal
expect(payment_methods).to include(internal1, internal2)
expect(payment_methods).not_to include(external)
end
end
describe "#customer_credit" do
it "returns the customer credit payment method" do
create(:customer_credit_payment_method)
@@ -99,13 +87,6 @@ RSpec.describe Spree::PaymentMethod do
end
end
describe "#api_customer_credit" do
it "returns the api customer credit payment method" do
create(:api_customer_credit_payment_method)
expect(Spree::PaymentMethod.api_customer_credit).to be_a(Spree::PaymentMethod::ApiCustomerCredit)
end
end
describe "#configured?" do
context "non-Stripe payment method" do
let(:payment_method) { build(:payment_method) }