2017-12-14 17:00:03 +01:00
|
|
|
describe 'new_gestionnaire/dossiers/print.html.haml', type: :view do
|
|
|
|
before { view.extend DossierHelper }
|
|
|
|
|
|
|
|
context "with a dossier" do
|
|
|
|
let(:current_gestionnaire) { create(:gestionnaire) }
|
2017-12-14 15:53:02 +01:00
|
|
|
let(:dossier) { create(:dossier, :en_instruction) }
|
2017-12-14 17:00:03 +01:00
|
|
|
|
|
|
|
before do
|
|
|
|
assign(:dossier, dossier)
|
2018-01-09 14:37:39 +01:00
|
|
|
allow(view).to receive(:current_gestionnaire).and_return(current_gestionnaire)
|
2017-12-14 17:00:03 +01:00
|
|
|
|
|
|
|
render
|
|
|
|
end
|
|
|
|
|
|
|
|
it { expect(rendered).to include("Dossier nº #{dossier.id}") }
|
|
|
|
it { expect(rendered).to include(dossier.procedure.libelle) }
|
|
|
|
end
|
|
|
|
end
|