add pdf to pjs export

This commit is contained in:
Christophe Robillard 2021-03-08 11:35:20 +01:00
parent e90957dd32
commit 60cc4d3697
6 changed files with 32 additions and 10 deletions

View file

@ -162,10 +162,11 @@ feature 'Instructing a dossier:' do
files = ZipTricks::FileReader.read_zip_structure(io: File.open(DownloadHelpers.download))
expect(DownloadHelpers.download).to include "dossier-#{dossier.id}.zip"
expect(files.size).to be 2
expect(files.size).to be 3
expect(files[0].filename.include?('piece_justificative_0')).to be_truthy
expect(files[0].uncompressed_size).to be File.size(path)
expect(files[1].filename.include?('horodatage/operation')).to be_truthy
expect(files[2].filename.include?('dossier/export')).to be_truthy
end
scenario 'A instructeur can download an archive containing several identical attachments' do
@ -176,13 +177,14 @@ feature 'Instructing a dossier:' do
files = ZipTricks::FileReader.read_zip_structure(io: File.open(DownloadHelpers.download))
expect(DownloadHelpers.download).to include "dossier-#{dossier.id}.zip"
expect(files.size).to be 3
expect(files.size).to be 4
expect(files[0].filename.include?('piece_justificative_0')).to be_truthy
expect(files[1].filename.include?('piece_justificative_0')).to be_truthy
expect(files[0].filename).not_to eq files[1].filename
expect(files[0].uncompressed_size).to be File.size(path)
expect(files[1].uncompressed_size).to be File.size(path)
expect(files[2].filename.include?('horodatage/operation')).to be_truthy
expect(files[3].filename.include?('dossier/export')).to be_truthy
end
before { DownloadHelpers.clear_downloads }