Gestionnaire can be filter on the specifics fields of the form when is on the folder list.

This commit is contained in:
Xavier J 2016-10-14 12:02:39 +02:00
parent f1515616ff
commit 49e4d6a9d3
5 changed files with 127 additions and 18 deletions

View file

@ -170,6 +170,21 @@ describe DossiersListGestionnaireService do
it { is_expected.to eq "CAST(dossiers.id as TEXT) LIKE '%23%' AND CAST(entreprises.raison_sociale as TEXT) LIKE 'plop%plip'" }
end
context 'when preference list contain a champ' do
before do
create :preference_list_dossier,
gestionnaire: gestionnaire,
table: 'champs',
attr: '34',
attr_decorate: '',
filter: 'plop',
procedure_id: create(:procedure)
end
it { is_expected.to eq "CAST(dossiers.id as TEXT) LIKE '%23%' AND CAST(entreprises.raison_sociale as TEXT) LIKE '%plop%' AND champs.type_de_champ_id = 34 AND CAST(champs.value as TEXT) LIKE '%plop%'" }
end
end
describe '#default_page' do