mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-22 20:16:50 +00:00
Create Payment Methods for each Enterprise instead of generic Payment Method
This commit is contained in:
@@ -16,7 +16,6 @@ namespace :openfoodweb do
|
||||
country = Spree::Country.find_by_name('Australia')
|
||||
Spree::ZoneMember.create(:zone => zone, :zoneable => country)
|
||||
FactoryGirl.create(:shipping_method, :zone => zone)
|
||||
FactoryGirl.create(:payment_method, :environment => 'development')
|
||||
end
|
||||
|
||||
|
||||
@@ -96,6 +95,13 @@ namespace :openfoodweb do
|
||||
end
|
||||
end
|
||||
|
||||
# -- Enterprise Payment Methods
|
||||
unless Spree::PaymentMethod.count > 1
|
||||
Enterprise.is_distributor.each do |distributor|
|
||||
FactoryGirl.create(:payment_method, distributor: distributor, name: "Cheque (#{distributor.name})", :environment => 'development')
|
||||
end
|
||||
end
|
||||
|
||||
# -- Products
|
||||
unless Spree::Product.count > 0
|
||||
puts "[#{task_name}] Seeding products"
|
||||
|
||||
Reference in New Issue
Block a user