fix(expert.attestation.url): was pointing to attestation_instructeur_dossier_path, so did not worked when expert was not instructeur. use active_storage_link, secured enough because served to authenticated users as well as expiring link
This commit is contained in:
parent
46c5830306
commit
2944a0c2c3
7 changed files with 6 additions and 20 deletions
|
@ -35,8 +35,10 @@ describe 'instructeurs/dossiers/show', type: :view do
|
|||
let(:dossier) { create :dossier, :accepte, :with_attestation }
|
||||
|
||||
it 'provides a link to the attestation' do
|
||||
pdf = dossier.attestation.pdf
|
||||
expect(dossier).to receive(:attestation).and_return(double(pdf: pdf)).at_least(2)
|
||||
expect(subject).to have_text('Attestation')
|
||||
expect(subject).to have_link(href: attestation_instructeur_dossier_path(dossier.procedure, dossier))
|
||||
expect(subject).to have_text("Télécharger l‘attestation")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue