demarches-normaliennes/spec/views/new_user/dossiers/show.html.haml_spec.rb
2018-08-13 11:32:27 +02:00

17 lines
464 B
Ruby

require 'spec_helper'
describe 'new_user/dossiers/show.html.haml', type: :view do
let(:dossier) { create(:dossier, :with_service, state: 'brouillon', procedure: create(:procedure)) }
before do
sign_in dossier.user
assign(:dossier, dossier)
end
subject! { render }
it 'affiche les informations du dossier' do
expect(rendered).to have_text(dossier.procedure.libelle)
expect(rendered).to have_text("Dossier nº #{dossier.id}")
end
end