From 2f7fbc8474f828c1d50f461e66764c7dc332230c Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 1 Jul 2020 09:20:53 +0000 Subject: [PATCH] specs: fix `shared/attachement/_update.html.haml` spec Avoid purging a non-saved file. --- spec/views/shared/attachment/_update.html.haml_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/views/shared/attachment/_update.html.haml_spec.rb b/spec/views/shared/attachment/_update.html.haml_spec.rb index a53a22856..dc65cc00c 100644 --- a/spec/views/shared/attachment/_update.html.haml_spec.rb +++ b/spec/views/shared/attachment/_update.html.haml_spec.rb @@ -16,7 +16,7 @@ describe 'shared/attachment/_update.html.haml', type: :view do context 'when there is no attached file' do before do - champ.piece_justificative_file.purge + champ.piece_justificative_file = nil end it 'renders a form field for uploading a file' do