Add a missing test to the _render_list_champs template’s test
This commit is contained in:
parent
4ce6c92394
commit
fd07a88ed6
1 changed files with 12 additions and 0 deletions
|
@ -1,6 +1,18 @@
|
||||||
describe 'users/description/champs/render_list_champs.html.haml', type: :view do
|
describe 'users/description/champs/render_list_champs.html.haml', type: :view do
|
||||||
let(:type_champ) { create(:type_de_champ_public, :checkbox) }
|
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 "with a checkbox champ" do
|
||||||
context "whose value equals nil" do
|
context "whose value equals nil" do
|
||||||
let!(:champ_checkbox_checked) { create(:champ, type_de_champ: type_champ, value: nil) }
|
let!(:champ_checkbox_checked) { create(:champ, type_de_champ: type_champ, value: nil) }
|
||||||
|
|
Loading…
Reference in a new issue