mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Remove payment method ApiCustomerCredit
This commit is contained in:
@@ -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
|
||||
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user