[Fix #3375] on the API display safe files only

This commit is contained in:
Mathieu Magnin 2019-02-05 20:57:58 +01:00 committed by Pierre de La Morinerie
parent 0dbe880f51
commit f7650135f4
3 changed files with 29 additions and 2 deletions

View file

@ -8,7 +8,10 @@ describe ChampSerializer do
let(:champ) { create(:champ_piece_justificative) }
before { champ.piece_justificative_file.attach({ filename: __FILE__, io: File.open(__FILE__) }) }
before do
champ.piece_justificative_file.attach({ filename: __FILE__, io: File.open(__FILE__) })
champ.reload.virus_scan.safe!
end
after { champ.piece_justificative_file.purge }
it { is_expected.to include(value: url_for(champ.piece_justificative_file)) }