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
|
@ -3,7 +3,7 @@ describe MailTemplateConcern do
|
|||
let(:dossier) { create(:dossier, procedure: procedure) }
|
||||
let(:dossier2) { create(:dossier, procedure: procedure) }
|
||||
let(:initiated_mail) { create(:initiated_mail, procedure: procedure) }
|
||||
let(:justificatif) { Rack::Test::UploadedFile.new("./spec/fixtures/files/piece_justificative_0.pdf", 'application/pdf') }
|
||||
let(:justificatif) { fixture_file_upload('spec/fixtures/files/piece_justificative_0.pdf', 'application/pdf') }
|
||||
|
||||
shared_examples "can replace tokens in template" do
|
||||
describe 'with no token to replace' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue