mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Removed checkout only from DISPLAY options on payment method edit form and updated payment_method_spec
This commit is contained in:
@@ -10,7 +10,7 @@ module Spree
|
||||
acts_as_taggable
|
||||
acts_as_paranoid
|
||||
|
||||
DISPLAY = [:both, :front_end, :back_end].freeze
|
||||
DISPLAY = [:both, :back_end].freeze
|
||||
default_scope -> { where(deleted_at: nil) }
|
||||
|
||||
has_many :credit_cards, class_name: "Spree::CreditCard"
|
||||
|
||||
@@ -13,7 +13,7 @@ module Spree
|
||||
before do
|
||||
Spree::PaymentMethod.delete_all
|
||||
|
||||
[nil, 'both', 'front_end', 'back_end'].each do |display_on|
|
||||
[nil, 'both', 'back_end'].each do |display_on|
|
||||
Spree::Gateway::Test.create(
|
||||
name: 'Display Both',
|
||||
display_on: display_on,
|
||||
@@ -23,7 +23,7 @@ module Spree
|
||||
distributors: [enterprise]
|
||||
)
|
||||
end
|
||||
expect(Spree::PaymentMethod.all.size).to eq 4
|
||||
expect(Spree::PaymentMethod.all.size).to eq 3
|
||||
end
|
||||
|
||||
it "should return all methods available to front-end/back-end when no parameter is passed" do
|
||||
@@ -34,10 +34,6 @@ module Spree
|
||||
expect(Spree::PaymentMethod.available(:both).size).to eq 2
|
||||
end
|
||||
|
||||
it "should return all methods available to front-end when display_on = :front_end" do
|
||||
expect(Spree::PaymentMethod.available(:front_end).size).to eq 2
|
||||
end
|
||||
|
||||
it "should return all methods available to back-end when display_on = :back_end" do
|
||||
expect(Spree::PaymentMethod.available(:back_end).size).to eq 2
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user