2015-08-13 15:55:19 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'dossiers/show.html.haml', type: :view do
|
2015-09-24 11:17:17 +02:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:dossier) { create(:dossier, :with_entreprise, user: user) }
|
2015-09-21 11:36:26 +02:00
|
|
|
|
2015-08-13 15:55:19 +02:00
|
|
|
before do
|
2015-12-24 15:10:20 +01:00
|
|
|
assign(:facade, DossierFacades.new(dossier.id, user.email))
|
2015-08-13 15:55:19 +02:00
|
|
|
|
|
|
|
render
|
|
|
|
end
|
2016-06-20 13:57:57 +02:00
|
|
|
|
2015-09-23 19:20:03 +02:00
|
|
|
context "sur la page d'information d'un SIRET" do
|
|
|
|
it 'Le formulaire envoie vers /users/dossiers/:dossier_id en #POST' do
|
|
|
|
expect(rendered).to have_selector("form[action='/users/dossiers'][method=post]")
|
2015-09-21 11:36:26 +02:00
|
|
|
end
|
|
|
|
|
2015-09-23 19:20:03 +02:00
|
|
|
it "les informations de l'entreprise sont présents" do
|
2015-09-21 11:36:26 +02:00
|
|
|
expect(rendered).to have_content('Siret')
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'le bouton "Etape suivante" est présent' do
|
|
|
|
expect(rendered).to have_selector('#etape_suivante')
|
|
|
|
end
|
|
|
|
end
|
2015-08-20 17:30:17 +02:00
|
|
|
end
|