fix(dossier_submitted_message#edit): missing dossier for preview

This commit is contained in:
mfo 2024-06-14 11:41:54 +02:00
parent 29e9268175
commit 2e1e1c060b
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)