ensure to_s is used on specialized champ

This commit is contained in:
simon lehericey 2021-05-18 11:34:05 +02:00
parent 45a4a3d2d0
commit a46000dc1f
2 changed files with 12 additions and 1 deletions

View file

@ -162,6 +162,17 @@ describe DossierProjectionService do
it { is_expected.to eq('quinoa') }
end
context 'for type_de_champ table and value to.s' do
let(:table) { 'type_de_champ' }
let(:procedure) { create(:procedure, :with_yes_no) }
let(:dossier) { create(:dossier, procedure: procedure) }
let(:column) { dossier.procedure.types_de_champ.first.stable_id.to_s }
before { dossier.champs.first.update(value: 'true') }
it { is_expected.to eq('Oui') }
end
end
end
end