Merge pull request #9799 from demarches-simplifiees/9782-format-motivation
ETQ instructeur, lorsque je motive une décision, la motivation est désormais bien formatée
This commit is contained in:
commit
505bdca11a
2 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ module TagsSubstitutionConcern
|
|||
|
||||
include Rails.application.routes.url_helpers
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
module TagsParser
|
||||
include Parsby::Combinators
|
||||
|
@ -64,7 +65,7 @@ module TagsSubstitutionConcern
|
|||
id: 'dossier_motivation',
|
||||
libelle: 'motivation',
|
||||
description: 'Motivation facultative associée à la décision finale d’acceptation, refus ou classement sans suite',
|
||||
target: :motivation,
|
||||
lambda: -> (d) { simple_format(d.motivation) },
|
||||
available_for_states: Dossier::TERMINE
|
||||
},
|
||||
{
|
||||
|
|
|
@ -240,7 +240,7 @@ describe TagsSubstitutionConcern, type: :model do
|
|||
context 'and the template has some dossier tags' do
|
||||
let(:template) { '--motivation-- --numéro du dossier--' }
|
||||
|
||||
it { is_expected.to eq("motivation #{dossier.id}") }
|
||||
it { is_expected.to eq("<p>motivation</p> #{dossier.id}") }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue