fix(instructeurs): pdf in exports include info administration
This commit is contained in:
parent
ef864021f7
commit
36d5569114
2 changed files with 5 additions and 1 deletions
|
@ -235,7 +235,7 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def telecharger_pjs
|
||||
files = ActiveStorage::DownloadableFile.create_list_from_dossiers(Dossier.where(id: dossier.id), with_champs_private: true)
|
||||
files = ActiveStorage::DownloadableFile.create_list_from_dossiers(Dossier.where(id: dossier.id), with_champs_private: true, include_infos_administration: true)
|
||||
cleaned_files = ActiveStorage::DownloadableFile.cleanup_list_from_dossier(files)
|
||||
|
||||
zipline(cleaned_files, "dossier-#{dossier.id}.zip")
|
||||
|
|
|
@ -865,6 +865,10 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
}
|
||||
end
|
||||
|
||||
before do
|
||||
allow(PiecesJustificativesService).to receive(:generate_dossier_export).with([dossier], include_infos_administration: true).and_call_original
|
||||
end
|
||||
|
||||
it 'includes an attachment' do
|
||||
expect(subject.headers['Content-Disposition']).to start_with('attachment; ')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue