Bring shipping_category factory from spree_core and merge with modification

This commit is contained in:
Luis Ramos
2020-08-23 13:25:32 +01:00
parent 313e6e2b45
commit 53a8fec181
2 changed files with 7 additions and 7 deletions

View File

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

View 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