diff --git a/app/views/users/dossiers/_dossier_actions.html.haml b/app/views/users/dossiers/_dossier_actions.html.haml index 57d39ceb8..cc9cc58ed 100644 --- a/app/views/users/dossiers/_dossier_actions.html.haml +++ b/app/views/users/dossiers/_dossier_actions.html.haml @@ -1,5 +1,5 @@ - has_delete_action = dossier.can_be_deleted_by_user? -- has_new_dossier_action = dossier.procedure.expects_multiple_submissions? && dossier.procedure.accepts_new_dossiers? +- has_new_dossier_action = dossier.procedure.accepts_new_dossiers? - has_actions = has_delete_action || has_new_dossier_action diff --git a/spec/views/users/dossiers/_dossier_actions.html.haml_spec.rb b/spec/views/users/dossiers/_dossier_actions.html.haml_spec.rb index 61c2ed107..1e3f19431 100644 --- a/spec/views/users/dossiers/_dossier_actions.html.haml_spec.rb +++ b/spec/views/users/dossiers/_dossier_actions.html.haml_spec.rb @@ -1,5 +1,5 @@ describe 'users/dossiers/dossier_actions.html.haml', type: :view do - let(:procedure) { create(:procedure, :published, expects_multiple_submissions: true) } + let(:procedure) { create(:procedure, :published) } let(:dossier) { create(:dossier, :en_construction, procedure: procedure) } subject { render 'users/dossiers/dossier_actions.html.haml', dossier: dossier } @@ -12,18 +12,13 @@ describe 'users/dossiers/dossier_actions.html.haml', type: :view do it { is_expected.not_to have_link('Supprimer le dossier') } end - context 'when the procedure doesn’t expect multiple submissions' do - let(:procedure) { create(:procedure, :published, expects_multiple_submissions: false) } - it { is_expected.not_to have_link('Commencer un autre dossier') } - end - context 'when the procedure is closed' do - let(:procedure) { create(:procedure, :archived, expects_multiple_submissions: true) } + let(:procedure) { create(:procedure, :archived) } it { is_expected.not_to have_link('Commencer un autre dossier') } end context 'when there are no actions to display' do - let(:procedure) { create(:procedure, :published, expects_multiple_submissions: false) } + let(:procedure) { create(:procedure, :archived) } let(:dossier) { create(:dossier, :accepte, procedure: procedure) } it 'doesn’t render the menu at all' do