mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +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')
|
country = Spree::Country.find_by_name('Australia')
|
||||||
Spree::ZoneMember.create(:zone => zone, :zoneable => country)
|
Spree::ZoneMember.create(:zone => zone, :zoneable => country)
|
||||||
FactoryGirl.create(:shipping_method, :zone => zone)
|
FactoryGirl.create(:shipping_method, :zone => zone)
|
||||||
FactoryGirl.create(:payment_method, :environment => 'development')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -96,6 +95,13 @@ namespace :openfoodweb do
|
|||||||
end
|
end
|
||||||
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
|
# -- Products
|
||||||
unless Spree::Product.count > 0
|
unless Spree::Product.count > 0
|
||||||
puts "[#{task_name}] Seeding products"
|
puts "[#{task_name}] Seeding products"
|
||||||
|
|||||||
Reference in New Issue
Block a user