PiecesJustificativesService: less violent error message in case of virus

This commit is contained in:
Simon Lehericey 2017-04-19 10:22:30 +02:00
parent 395c9d5bb1
commit 21d7a96062
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ class PiecesJustificativesService
.partition { |_, content| ClamavService.safe_file?(content.path) }
errors = with_virus
.map { |_, content| content.original_filename + ': <b>Virus détecté !!</b>' }
.map { |_, content| content.original_filename + ' : virus détecté' }
errors += without_virus
.map { |tpj, content| save_pj(content, dossier, tpj, user) }

View file

@ -47,7 +47,7 @@ describe PiecesJustificativesService do
}
end
it { expect(errors).to match(['bad_file: <b>Virus détecté !!</b>']) }
it { expect(errors).to match(['bad_file : virus détecté']) }
end
end