demarches-normaliennes/spec/factories/attestation.rb
Pierre de La Morinerie 43569f687e specs: use fixture_file_upload rather than Rack::Test::UploadedFile
This is mostly for consistency (both styles were used before).

Note: we still have to use `Rack::Test::UploadedFile.new` in factories,
because of https://github.com/thoughtbot/factory_bot/issues/385.
2020-07-01 11:13:45 +02:00

10 lines
238 B
Ruby

FactoryBot.define do
factory :attestation do
title { 'title' }
dossier { create(:dossier) }
end
trait :with_pdf do
pdf { Rack::Test::UploadedFile.new('spec/fixtures/files/dossierPDF.pdf', 'application/pdf') }
end
end