fix tag_substitution_concern links for lien attestation
This commit is contained in:
parent
c98655be52
commit
d0794f42d1
2 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ module TagsSubstitutionConcern
|
|||
libelle: 'lien attestation',
|
||||
description: '',
|
||||
lambda: -> (d) {
|
||||
links = [external_link("Télécharger l'attestation", attestation_dossier_url(d))]
|
||||
links = [external_link(attestation_dossier_url(d))]
|
||||
if d.justificatif_motivation.attached?
|
||||
links.push external_link("Télécharger le justificatif", url_for_justificatif_motivation(d))
|
||||
end
|
||||
|
|
|
@ -77,7 +77,7 @@ describe MailTemplateConcern do
|
|||
|
||||
describe "in closed mail without justificatif" do
|
||||
let(:mail) { create(:closed_mail, procedure: procedure) }
|
||||
it { is_expected.to eq("<a target=\"_blank\" rel=\"noopener\" href=\"http://localhost:3000/dossiers/#{dossier.id}/attestation\">Télécharger l'attestation</a>") }
|
||||
it { is_expected.to eq("<a target=\"_blank\" rel=\"noopener\" href=\"http://localhost:3000/dossiers/#{dossier.id}/attestation\">http://localhost:3000/dossiers/#{dossier.id}/attestation</a>") }
|
||||
it { is_expected.to_not include("Télécharger le justificatif") }
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,7 @@ describe MailTemplateConcern do
|
|||
let(:mail) { create(:closed_mail, procedure: procedure) }
|
||||
|
||||
it { expect(dossier.justificatif_motivation).to be_attached }
|
||||
it { is_expected.to include("<a target=\"_blank\" rel=\"noopener\" href=\"http://localhost:3000/dossiers/#{dossier.id}/attestation\">Télécharger l'attestation</a>") }
|
||||
it { is_expected.to include("<a target=\"_blank\" rel=\"noopener\" href=\"http://localhost:3000/dossiers/#{dossier.id}/attestation\">http://localhost:3000/dossiers/#{dossier.id}/attestation</a>") }
|
||||
it { is_expected.to include("Télécharger le justificatif") }
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue