mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Reimplement Spree<2.0 :simple_product factory in OFN
This commit is contained in:
@@ -453,6 +453,10 @@ FactoryBot.define do
|
||||
Spree::Image.create(attachment: image, viewable_id: product.master.id, viewable_type: 'Spree::Variant')
|
||||
end
|
||||
end
|
||||
|
||||
factory :simple_product, parent: :base_product do
|
||||
on_hand 5
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -526,4 +530,5 @@ FactoryBot.modify do
|
||||
user.spree_roles << Spree::Role.find_or_create_by_name!('admin')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user