Fix static file path in order_cycle_factory

This commit is contained in:
luisramos0
2019-06-14 12:30:36 +01:00
parent bd493c392a
commit 42f8b2efed

View File

@@ -38,7 +38,7 @@ FactoryBot.define do
# Products with images
[ex1, ex2].each do |exchange|
product = create(:product, supplier: exchange.sender)
image = File.open(File.expand_path('../../app/assets/images/logo-white.png', __FILE__))
image = File.open(File.expand_path('../../../app/assets/images/logo-white.png', __FILE__))
Spree::Image.create({:viewable_id => product.master.id, :viewable_type => 'Spree::Variant', :alt => "position 1", :attachment => image, :position => 1})
exchange.variants << product.variants.first