Basic test on print view
This commit is contained in:
parent
ae0a22408b
commit
09750491ca
1 changed files with 18 additions and 0 deletions
18
spec/views/new_gestionnaire/dossiers/print.html.haml_spec.rb
Normal file
18
spec/views/new_gestionnaire/dossiers/print.html.haml_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
describe 'new_gestionnaire/dossiers/print.html.haml', type: :view do
|
||||
before { view.extend DossierHelper }
|
||||
|
||||
context "with a dossier" do
|
||||
let(:current_gestionnaire) { create(:gestionnaire) }
|
||||
let(:dossier) { create(:dossier, :received) }
|
||||
|
||||
before do
|
||||
assign(:dossier, dossier)
|
||||
view.stub(:current_gestionnaire).and_return(current_gestionnaire)
|
||||
|
||||
render
|
||||
end
|
||||
|
||||
it { expect(rendered).to include("Dossier nº #{dossier.id}") }
|
||||
it { expect(rendered).to include(dossier.procedure.libelle) }
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue