Merge pull request #1106 from sgmap/test-print

Basic test on print view
This commit is contained in:
Mathieu Magnin 2017-12-15 11:25:36 +01:00 committed by GitHub
commit 461dd9e843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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