controllers: disable explicit purge of invalid file

This commit is contained in:
Pierre de La Morinerie 2020-06-24 17:25:32 +02:00
parent 719915e69f
commit b8706757e3
2 changed files with 1 additions and 7 deletions

View file

@ -44,7 +44,7 @@ describe Champs::PieceJustificativeController, type: :controller do
# See https://github.com/betagouv/demarches-simplifiees.fr/issues/4926
before do
champ
expect_any_instance_of(Champs::PieceJustificativeChamp).to receive(:save).and_return(false)
expect_any_instance_of(Champs::PieceJustificativeChamp).to receive(:save).twice.and_return(false)
expect_any_instance_of(Champs::PieceJustificativeChamp).to receive(:errors)
.and_return(double(full_messages: ['La pièce justificative nest pas dun type accepté']))
end