suppression du message d'alerte suite aux problèmes d'upload

This commit is contained in:
clemkeirua 2020-07-27 10:32:03 +02:00
parent 98fbf69f58
commit de1df85462
7 changed files with 0 additions and 1108 deletions

View file

@ -50,15 +50,5 @@ describe 'shared/dossiers/demande.html.haml', type: :view do
expect(subject).to include(champ.libelle)
end
end
context 'when the dossier lost some attachments' do
before do
expect(view).to receive(:has_lost_attachments).and_return(true)
end
it 'displays a warning message' do
expect(subject).to include('Des pièces jointes de votre dossier peuvent être manquantes.')
end
end
end
end

View file

@ -1,40 +0,0 @@
describe 'shared/dossiers/lost_attachments.html.haml', type: :view do
let(:procedure) { create(:procedure, :published) }
let(:dossier) { create(:dossier, :en_construction, procedure: procedure) }
subject { render 'shared/dossiers/lost_attachments.html.haml', dossier: dossier, profile: profile }
context 'when viewed by an Usager' do
let(:profile) { 'usager' }
it 'displays a warning message' do
expect(subject).to include('Des pièces jointes de votre dossier peuvent être manquantes')
expect(subject).to have_link('renvoyer les pièces jointes manquantes', href: modifier_dossier_path(dossier))
end
context 'when the user cant edit the dossier' do
let(:dossier) { create(:dossier, :en_instruction, procedure: procedure) }
it 'suggest to wait' do
expect(subject).to include('ladministration vous contactera')
end
end
end
context 'when viewed by an Instructeur' do
let(:profile) { 'instructeur' }
it 'displays a warning message' do
expect(subject).to include('Des pièces jointes de ce dossier peuvent être manquantes')
expect(subject).to have_link('contacter le demandeur')
end
context 'when the user cant edit the dossier' do
let(:dossier) { create(:dossier, :en_instruction, procedure: procedure) }
it 'suggest to make the dossier editable again' do
expect(subject).to include('repasser ce dossier en construction')
end
end
end
end