2017-07-11 16:50:29 +02:00
|
|
|
|
describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
|
2017-10-23 10:29:46 +02:00
|
|
|
|
let(:current_gestionnaire) { create(:gestionnaire) }
|
2018-09-25 15:56:18 +02:00
|
|
|
|
let(:dossier) { create(:dossier, :en_construction) }
|
2017-07-11 16:50:29 +02:00
|
|
|
|
|
|
|
|
|
before do
|
2018-09-25 15:56:18 +02:00
|
|
|
|
sign_in current_gestionnaire
|
2017-07-11 16:50:29 +02:00
|
|
|
|
assign(:dossier, dossier)
|
|
|
|
|
end
|
|
|
|
|
|
2018-09-25 15:56:18 +02:00
|
|
|
|
subject! { render }
|
2017-07-11 16:50:29 +02:00
|
|
|
|
|
2018-09-25 15:56:18 +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
|
|
|
|
|
|
2018-09-25 15:56:18 +02:00
|
|
|
|
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
|