mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Bring shipping_category factory from spree_core and merge with modification
This commit is contained in:
@@ -160,10 +160,3 @@ FactoryBot.define do
|
||||
stripe_publishable_key "xyz456"
|
||||
end
|
||||
end
|
||||
|
||||
FactoryBot.modify do
|
||||
factory :shipping_category, class: Spree::ShippingCategory do
|
||||
initialize_with { DefaultShippingCategory.find_or_create }
|
||||
transient { name 'Default' }
|
||||
end
|
||||
end
|
||||
|
||||
7
spec/factories/shipping_category_factory.rb
Normal file
7
spec/factories/shipping_category_factory.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
factory :shipping_category, class: Spree::ShippingCategory do
|
||||
initialize_with { DefaultShippingCategory.find_or_create }
|
||||
transient { name 'Default' }
|
||||
sequence(:name) { |n| "ShippingCategory ##{n}" }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user