Reimplement Spree<2.0 :simple_product factory in OFN

This commit is contained in:
Hugo Daniel
2018-07-24 16:27:30 +02:00
parent 7707df354b
commit eab04e0d86

View File

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