Bring payment method factory from spree_core and merge with modification

This commit is contained in:
Luis Ramos
2020-08-23 13:19:36 +01:00
parent aa9054659e
commit e1fb13b491
2 changed files with 13 additions and 4 deletions

View File

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

View 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