!!FIX BUG : values does not appear on info dossier

This commit is contained in:
Xavier J 2016-02-25 11:50:09 +01:00
parent e1d1e356e5
commit a316165792
2 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,7 @@ class ChampDecorator < Draper::Decorator
if type_champ == 'checkbox'
return object.value == 'on' ? 'Oui' : 'Non'
end
object.value
end
def type_champ

View file

@ -4,6 +4,11 @@ describe 'dossiers/_infos_dossier.html.haml', type: :view do
let(:dossier) { create(:dossier, :with_entreprise, procedure: create(:procedure, :with_api_carto, :with_type_de_champ)) }
before do
champs.each do |champ|
champ.value = ((0...8).map { (65 + rand(26)).chr }.join)
champ.save
end
assign(:facade, DossierFacades.new(dossier.id, dossier.user.email))
render
end