diff --git a/spec/views/users/description/champs/_render_list_champs.html.haml_spec.rb b/spec/views/users/description/champs/_render_list_champs.html.haml_spec.rb index 4e8982faf..233114a9b 100644 --- a/spec/views/users/description/champs/_render_list_champs.html.haml_spec.rb +++ b/spec/views/users/description/champs/_render_list_champs.html.haml_spec.rb @@ -1,6 +1,18 @@ describe 'users/description/champs/render_list_champs.html.haml', type: :view do let(:type_champ) { create(:type_de_champ_public, :checkbox) } + context "with any champ" do + let!(:champ) { create(:champ, type_de_champ: type_champ, value: nil) } + + before do + render 'users/description/champs/render_list_champs.html.haml', champs: Champ.all, order_place: 0 + end + + it "should render the champ's libelle" do + expect(rendered).to have_content(champ.libelle) + end + end + context "with a checkbox champ" do context "whose value equals nil" do let!(:champ_checkbox_checked) { create(:champ, type_de_champ: type_champ, value: nil) }