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:
Pierre de La Morinerie 2020-06-30 15:53:54 +00:00
parent dbba5644e3
commit 43569f687e
16 changed files with 28 additions and 28 deletions

View file

@ -27,7 +27,7 @@ describe CommentaireService do
end
context 'when it has a file' do
let(:file) { Rack::Test::UploadedFile.new("./spec/fixtures/files/piece_justificative_0.pdf", 'application/pdf') }
let(:file) { fixture_file_upload('spec/fixtures/files/piece_justificative_0.pdf', 'application/pdf') }
before do
expect(ClamavService).to receive(:safe_file?).and_return(true)