Files
openfoodnetwork/spec/support/file_helper.rb
David Cook 177445521c Move most images to asset pipeline
Webpacker still needs to know about them in order to build links.
2025-02-03 17:44:13 +11:00

25 lines
551 B
Ruby

# frozen_string_literal: true
module FileHelper
def black_logo_file
Rack::Test::UploadedFile.new(black_logo_path, "image/png")
end
def white_logo_file
Rack::Test::UploadedFile.new(white_logo_path, "image/png")
end
def black_logo_path
Rails.root.join('app/assets/images/logo-black.png')
end
def white_logo_path
Rails.root.join('app/assets/images/logo-white.png')
end
def terms_pdf_file
file_path = Rails.public_path.join("Terms-of-service.pdf")
fixture_file_upload(file_path, "application/pdf")
end
end