Add a missing test to the _render_list_champs template’s test

This commit is contained in:
gregoirenovel 2017-04-26 12:46:57 +02:00
parent 4ce6c92394
commit fd07a88ed6

View file

@ -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) }