Files
openfoodnetwork/spec/support/file_helper.rb
Maikel Linke 4a0ed99919 Replace Paperclip on Enterprise model
We configured Paperclip to convert images to JPG in some cases but I
omitted that here because we don't need it. If an image is better
represented as PNG or another format then the user should be able to
choose that.

Some specs were also testing the generated URL but the Active Storage
URL doesn't contain a style name anymore and it's not helpful to test
the URL.
2022-06-01 17:16:55 +10:00

20 lines
386 B
Ruby

# frozen_string_literal: true
module FileHelper
def black_logo_file
Rack::Test::UploadedFile.new(black_logo_path)
end
def white_logo_file
Rack::Test::UploadedFile.new(white_logo_path)
end
def black_logo_path
Rails.root.join('app/webpacker/images/logo-black.png')
end
def white_logo_path
Rails.root.join('app/webpacker/images/logo-white.png')
end
end