feat(search): index mandataire name
This commit is contained in:
parent
39b0327237
commit
6733b2884f
2 changed files with 11 additions and 1 deletions
|
@ -18,7 +18,9 @@ module DossierSearchableConcern
|
||||||
*champs_public.flat_map(&:search_terms),
|
*champs_public.flat_map(&:search_terms),
|
||||||
*etablissement&.search_terms,
|
*etablissement&.search_terms,
|
||||||
individual&.nom,
|
individual&.nom,
|
||||||
individual&.prenom
|
individual&.prenom,
|
||||||
|
mandataire_first_name,
|
||||||
|
mandataire_last_name
|
||||||
].compact_blank.join(' ')
|
].compact_blank.join(' ')
|
||||||
|
|
||||||
private_search_terms = champs_private.flat_map(&:search_terms).compact_blank.join(' ')
|
private_search_terms = champs_private.flat_map(&:search_terms).compact_blank.join(' ')
|
||||||
|
|
|
@ -56,5 +56,13 @@ describe DossierSearchableConcern do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'mandataire' do
|
||||||
|
it "update columns" do
|
||||||
|
dossier.update(mandataire_first_name: "Chris")
|
||||||
|
perform_enqueued_jobs(only: DossierIndexSearchTermsJob)
|
||||||
|
expect(result["search_terms"]).to include("Chris")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue