2018-06-19 16:23:43 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'new_user/dossiers/identite.html.haml', type: :view do
|
2018-11-27 15:57:29 +01:00
|
|
|
let(:dossier) { create(:dossier, :with_entreprise, :with_service, state: Dossier.states.fetch(:brouillon), procedure: create(:procedure, :with_two_type_de_piece_justificative, for_individual: true)) }
|
2018-06-19 16:23:43 +02:00
|
|
|
let(:footer) { view.content_for(:footer) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in dossier.user
|
|
|
|
assign(:dossier, dossier)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'test de composition de la page' do
|
|
|
|
before do
|
|
|
|
render
|
|
|
|
end
|
|
|
|
|
2018-09-05 14:48:42 +02:00
|
|
|
it 'affiche les informations de la démarche' do
|
2018-06-19 16:23:43 +02:00
|
|
|
expect(rendered).to have_text(dossier.procedure.libelle)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'prépare le footer' do
|
|
|
|
expect(footer).to have_selector('footer')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|