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

22 lines
574 B
Ruby
Raw Normal View History

2017-07-11 16:50:29 +02:00
describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
let(:current_gestionnaire) { create(:gestionnaire) }
let(:dossier) { create(:dossier, :en_construction) }
2017-07-11 16:50:29 +02:00
before do
sign_in current_gestionnaire
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
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')
expect(rendered).to have_text('Pièces jointes')
2017-07-11 16:50:29 +02:00
end
end