mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Bring payment method factory from spree_core and merge with modification
This commit is contained in:
@@ -162,10 +162,6 @@ FactoryBot.define do
|
||||
end
|
||||
|
||||
FactoryBot.modify do
|
||||
factory :payment_method do
|
||||
distributors { [Enterprise.is_distributor.first || FactoryBot.create(:distributor_enterprise)] }
|
||||
end
|
||||
|
||||
factory :option_type do
|
||||
# Prevent inconsistent ordering in specs when all option types have the same (0) position
|
||||
sequence(:position)
|
||||
|
||||
13
spec/factories/payment_method_factory.rb
Normal file
13
spec/factories/payment_method_factory.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
FactoryGirl.define do
|
||||
factory :payment_method, class: Spree::PaymentMethod::Check do
|
||||
name 'Check'
|
||||
environment 'test'
|
||||
|
||||
distributors { [Enterprise.is_distributor.first || FactoryBot.create(:distributor_enterprise)] }
|
||||
end
|
||||
|
||||
factory :bogus_payment_method, class: Spree::Gateway::Bogus do
|
||||
name 'Credit Card'
|
||||
environment 'test'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user