tests
This commit is contained in:
parent
328c2a8e3c
commit
81f5a5254b
16 changed files with 544 additions and 674 deletions
|
@ -12,7 +12,6 @@ describe 'shared/dossiers/champs.html.haml', type: :view do
|
|||
|
||||
context "there are some champs" do
|
||||
let(:dossier) { create(:dossier) }
|
||||
let(:avis) { create :avis, dossier: dossier, instructeur: instructeur }
|
||||
let(:champ1) { create(:champ_checkbox, dossier: dossier, value: "on") }
|
||||
let(:champ2) { create(:champ_header_section, dossier: dossier, value: "Section") }
|
||||
let(:champ3) { create(:champ_explication, dossier: dossier, value: "mazette") }
|
||||
|
@ -20,8 +19,6 @@ describe 'shared/dossiers/champs.html.haml', type: :view do
|
|||
let(:champ5) { create(:champ_textarea, dossier: dossier, value: "Some long text in a textarea.") }
|
||||
let(:champs) { [champ1, champ2, champ3, champ4, champ5] }
|
||||
|
||||
before { dossier.avis << avis }
|
||||
|
||||
it "renders titles and values of champs" do
|
||||
expect(subject).to include(champ1.libelle)
|
||||
expect(subject).to include(champ1.value)
|
||||
|
@ -29,7 +26,6 @@ describe 'shared/dossiers/champs.html.haml', type: :view do
|
|||
expect(subject).to have_css(".header-section")
|
||||
expect(subject).to include(champ2.libelle)
|
||||
|
||||
expect(subject).to have_link("Dossier nº #{dossier.id}")
|
||||
expect(subject).to include(dossier.text_summary)
|
||||
|
||||
expect(subject).to include(champ5.libelle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue