demarches-normaliennes/spec/views/instructeur/dossiers/show.html.haml_spec.rb
2019-08-13 15:15:16 +02:00

21 lines
596 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

describe 'instructeurs/dossiers/show.html.haml', type: :view do
let(:current_instructeur) { create(:instructeur) }
let(:dossier) { create(:dossier, :en_construction) }
before do
sign_in current_instructeur
allow(view).to receive(:current_instructeur).and_return(current_instructeur)
assign(:dossier, dossier)
end
subject! { render }
it 'renders the header' do
expect(rendered).to have_text("Dossier nº #{dossier.id}")
end
it 'renders the dossier infos' do
expect(rendered).to have_text('Identité')
expect(rendered).to have_text('Demande')
end
end