From 2e1e1c060b17bc05781d515f12bc122ee459f9de Mon Sep 17 00:00:00 2001 From: mfo Date: Fri, 14 Jun 2024 11:41:54 +0200 Subject: [PATCH] fix(dossier_submitted_message#edit): missing dossier for preview --- app/views/users/dossiers/_merci.html.haml | 2 +- .../dossier_submitted_messages_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/dossiers/_merci.html.haml b/app/views/users/dossiers/_merci.html.haml index b9bb097c6..be9f3096c 100644 --- a/app/views/users/dossiers/_merci.html.haml +++ b/app/views/users/dossiers/_merci.html.haml @@ -20,7 +20,7 @@ - if procedure.active_dossier_submitted_message %p.fr-m-2= procedure.active_dossier_submitted_message.message_on_submit_by_usager %p.justify-center.flex.fr-mb-5w.fr-mt-2w - = link_to "#{t('views.users.dossiers.merci.download_dossier')} (PDF)", dossier_path(dossier, format: :pdf), download: "Mon dossier", target: "_blank", rel: "noopener", title: t('views.users.dossiers.show.header.print_dossier'), class: 'fr-btn fr-btn--secondary fr-mx-2w fr-btn--icon-left fr-icon-download-line' + = link_to "#{t('views.users.dossiers.merci.download_dossier')} (PDF)", dossier ? dossier_path(dossier, format: :pdf) : "#", download: "Mon dossier", target: "_blank", rel: "noopener", title: t('views.users.dossiers.show.header.print_dossier'), class: 'fr-btn fr-btn--secondary fr-mx-2w fr-btn--icon-left fr-icon-download-line' = link_to t('views.users.dossiers.merci.acces_dossier'), dossier ? dossier_path(dossier) : "#dossier" , class: 'fr-btn fr-mx-2w' %hr.fr-hr diff --git a/spec/controllers/administrateurs/dossier_submitted_messages_controller_spec.rb b/spec/controllers/administrateurs/dossier_submitted_messages_controller_spec.rb index 4bfb5babe..46f002f05 100644 --- a/spec/controllers/administrateurs/dossier_submitted_messages_controller_spec.rb +++ b/spec/controllers/administrateurs/dossier_submitted_messages_controller_spec.rb @@ -34,7 +34,7 @@ describe Administrateurs::DossierSubmittedMessagesController, type: :controller describe '#edit' do context 'when procedure is draft and have a DossierSubmittedMessage' do let(:procedure) { create(:procedure, :with_dossier_submitted_message, administrateur: administrateur) } - + render_views it 'assigns the existing DossierSubmittedMessage' do get(:edit, params: { procedure_id: procedure.id }) expect(response).to have_http_status(200)