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

22 lines
602 B
Ruby
Raw Normal View History

describe 'instructeurs/dossiers/show.html.haml', type: :view do
let(:current_instructeur) { create(:instructeur) }
let(:dossier) { create(:dossier, :en_construction) }
2017-07-11 16:50:29 +02:00
before do
2019-08-07 11:15:16 +02:00
sign_in(current_instructeur.user)
allow(view).to receive(:current_instructeur).and_return(current_instructeur)
2017-07-11 16:50:29 +02:00
assign(:dossier, dossier)
end
subject! { render }
2017-07-11 16:50:29 +02:00
it 'renders the header' do
2018-10-08 18:44:19 +02:00
expect(rendered).to have_text("Dossier nº #{dossier.id}")
2017-07-11 16:50:29 +02:00
end
it 'renders the dossier infos' do
expect(rendered).to have_text('Identité')
expect(rendered).to have_text('Demande')
2017-07-11 16:50:29 +02:00
end
end