Create Payment Methods for each Enterprise instead of generic Payment Method

This commit is contained in:
David Cook
2013-08-19 12:04:45 +10:00
parent 77329b5532
commit 6f73f41700

View File

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