mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Update spec references to removed file logo.jpg
This commit is contained in:
@@ -42,7 +42,7 @@ FactoryGirl.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.jpg', __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.master
|
||||
|
||||
@@ -201,7 +201,7 @@ feature %q{
|
||||
|
||||
scenario "deleting product images", js: true do
|
||||
product = create(:simple_product, supplier: @supplier2)
|
||||
image = File.open(File.expand_path('../../../../app/assets/images/logo.jpg', __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})
|
||||
|
||||
visit spree.admin_product_images_path(product)
|
||||
|
||||
@@ -21,7 +21,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
|
||||
|
||||
it "shows a distributor with images" do
|
||||
# Given the distributor has a logo
|
||||
distributor.logo = File.new(Rails.root + 'app/assets/images/logo.jpg')
|
||||
distributor.logo = File.new(Rails.root + 'app/assets/images/logo-white.png')
|
||||
distributor.save!
|
||||
|
||||
# Then we should see the distributor and its logo
|
||||
|
||||
@@ -30,7 +30,7 @@ describe EnterpriseGroup do
|
||||
|
||||
# it "can have an image" do
|
||||
# eg = create(:enterprise_group)
|
||||
# image_file = File.open(File.expand_path('../../../app/assets/images/logo.jpg', __FILE__))
|
||||
# image_file = File.open(File.expand_path('../../../app/assets/images/logo-white.png', __FILE__))
|
||||
# image = Spree::Image.create(viewable_id: eg.id, viewable_type: 'EnterpriseGroup', attachment: image_file)
|
||||
# eg.reload.image.should == image
|
||||
# end
|
||||
|
||||
Reference in New Issue
Block a user