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.
This commit is contained in:
parent
dbba5644e3
commit
43569f687e
16 changed files with 28 additions and 28 deletions
|
@ -5,6 +5,6 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
trait :with_pdf do
|
||||
pdf { Rack::Test::UploadedFile.new("./spec/fixtures/files/dossierPDF.pdf", 'application/pdf') }
|
||||
pdf { Rack::Test::UploadedFile.new('spec/fixtures/files/dossierPDF.pdf', 'application/pdf') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ FactoryBot.define do
|
|||
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') }
|
||||
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
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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') }
|
||||
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
|
||||
|
|
|
@ -9,7 +9,7 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
trait :with_file do
|
||||
piece_jointe { Rack::Test::UploadedFile.new("./spec/fixtures/files/logo_test_procedure.png", 'image/png') }
|
||||
piece_jointe { Rack::Test::UploadedFile.new('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -55,7 +55,7 @@ FactoryBot.define do
|
|||
end
|
||||
|
||||
trait :with_logo do
|
||||
logo { Rack::Test::UploadedFile.new("./spec/fixtures/files/logo_test_procedure.png", 'image/png') }
|
||||
logo { Rack::Test::UploadedFile.new('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
|
||||
end
|
||||
|
||||
trait :with_path do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue