Reformat the _render_list_champs template test

This commit is contained in:
gregoirenovel 2017-04-26 12:44:32 +02:00
parent 6e8ee504a9
commit 4ce6c92394

View file

@ -1,7 +1,8 @@
describe 'users/description/champs/render_list_champs.html.haml', type: :view do
let(:type_champ) { create(:type_de_champ_public, :checkbox) }
context "with a checkbox champ with value equals nil" do
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) }
before do
@ -13,7 +14,7 @@ describe 'users/description/champs/render_list_champs.html.haml', type: :view do
end
end
context "with a checkbox champ with value equals 'on'" do
context "whose value equals 'on'" do
let!(:champ_checkbox_checked) { create(:champ, type_de_champ: type_champ, value: 'on') }
before do
@ -24,6 +25,7 @@ describe 'users/description/champs/render_list_champs.html.haml', type: :view do
expect(rendered).to have_css('input[type=checkbox][checked]')
end
end
end
context 'with a dossier_link' do
let(:type_champ) { create(:type_de_champ_public, type_champ: :dossier_link) }