2019-08-06 11:02:54 +02:00
|
|
|
describe 'instructeurs/dossiers/print.html.haml', type: :view do
|
2017-12-14 17:00:03 +01:00
|
|
|
before { view.extend DossierHelper }
|
|
|
|
|
|
|
|
context "with a dossier" do
|
2019-08-06 11:02:54 +02:00
|
|
|
let(:current_instructeur) { create(:instructeur) }
|
2018-09-05 16:17:26 +02:00
|
|
|
let(:dossier) { create(:dossier, :en_instruction, :with_commentaires) }
|
2017-12-14 17:00:03 +01:00
|
|
|
|
|
|
|
before do
|
|
|
|
assign(:dossier, dossier)
|
2019-08-06 11:02:54 +02:00
|
|
|
allow(view).to receive(:current_instructeur).and_return(current_instructeur)
|
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
|