diff --git a/app/models/attestation_template.rb b/app/models/attestation_template.rb index 4b36d53ef..9bac00521 100644 --- a/app/models/attestation_template.rb +++ b/app/models/attestation_template.rb @@ -75,7 +75,7 @@ class AttestationTemplate < ApplicationRecord end def etablissement_tags - [{ libelle: 'adresse', description: '', target: 'adresse' }] + [{ libelle: 'adresse', description: '', target: 'inline_adresse' }] end def build_pdf(dossier) diff --git a/spec/models/attestation_template_spec.rb b/spec/models/attestation_template_spec.rb index 873d2a112..a9d5e5191 100644 --- a/spec/models/attestation_template_spec.rb +++ b/spec/models/attestation_template_spec.rb @@ -159,7 +159,7 @@ describe AttestationTemplate, type: :model do let(:etablissement) { create(:etablissement, adresse: 'adresse') } let(:template_title) { '--adresse--' } - it { expect(view_args[:title]).to eq('adresse') } + it { expect(view_args[:title]).to eq(etablissement.inline_adresse) } end end end