feat: when previous dossiers existing, redirect to list filtered by procedure_id

This commit is contained in:
simon lehericey 2023-10-09 17:12:27 +02:00
parent b2962c16e5
commit 95fb3671fb
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@
= render Dsfr::CalloutComponent.new(title: t("views.commencer.show.existing_dossiers"), heading_level: 'h2') do |c|
- c.body do
%ul.fr-btns-group.fr-btns-group--inline
%li= link_to t('views.commencer.show.show_dossiers'), dossiers_path, class: "fr-btn"
%li= link_to t('views.commencer.show.show_dossiers'), dossiers_path(procedure_id: @procedure.id), class: "fr-btn"
%li= link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: "fr-btn fr-btn--secondary"

View file

@ -74,7 +74,7 @@ RSpec.describe 'commencer/show', type: :view do
it 'renders a link to the dossiers list' do
subject
expect(rendered).to have_link('Voir mes dossiers en cours', href: dossiers_path)
expect(rendered).to have_link('Voir mes dossiers en cours', href: dossiers_path(procedure_id: procedure.id))
end
end