demarches-normaliennes/spec/views/instructeur/dossiers/print.html.haml_spec.rb

21 lines
584 B
Ruby
Raw Normal View History

# frozen_string_literal: true
describe 'instructeurs/dossiers/print', type: :view do
2017-12-14 17:00:03 +01:00
before { view.extend DossierHelper }
context "with a dossier" do
let(:current_instructeur) { create(:instructeur) }
let(:dossier) { create(:dossier, :en_instruction, :with_commentaires) }
2017-12-14 17:00:03 +01:00
before do
assign(:dossier, dossier)
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