demarches-normaliennes/spec/factories/bill_signature.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

6 lines
311 B
Ruby

FactoryBot.define do
factory :bill_signature do
serialized { Rack::Test::UploadedFile.new('spec/fixtures/files/bill_signature/serialized.json', 'application/json') }
signature { Rack::Test::UploadedFile.new('spec/fixtures/files/bill_signature/signature.der', 'application/x-x509-ca-cert') }
end
end