demarches-normaliennes/spec/factories/attestation_template.rb

20 lines
650 B
Ruby
Raw Normal View History

2018-01-23 17:15:42 +01:00
FactoryBot.define do
factory :attestation_template do
2018-09-04 16:46:48 +02:00
title { 'title' }
body { 'body' }
footer { 'footer' }
activated { true }
association :procedure
end
trait :with_files do
logo { Rack::Test::UploadedFile.new('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
signature { Rack::Test::UploadedFile.new('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
end
2020-03-11 16:57:29 +01:00
trait :with_gif_files do
logo { Rack::Test::UploadedFile.new('./spec/fixtures/files/french-flag.gif', 'image/gif') }
signature { Rack::Test::UploadedFile.new('./spec/fixtures/files/beta-gouv.gif', 'image/gif') }
end
end