add ui for integrity error
This commit is contained in:
parent
e636e3a752
commit
7567e51a3f
2 changed files with 16 additions and 0 deletions
|
@ -55,4 +55,14 @@ describe 'shared/attachment/_show.html.haml', type: :view do
|
|||
expect(subject).to have_text('virus détecté')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the file is corrupted' do
|
||||
let(:virus_scan_result) { ActiveStorage::VirusScanner::INTEGRITY_ERROR }
|
||||
|
||||
it 'displays the filename, but doesn’t allow to download the file' do
|
||||
expect(subject).to have_text(champ.piece_justificative_file.filename.to_s)
|
||||
expect(subject).not_to have_link(champ.piece_justificative_file.filename.to_s)
|
||||
expect(subject).to have_text('corrompu')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue