User can be begin without SIRET

This commit is contained in:
Xavier J 2016-08-30 11:18:43 +02:00
parent ed8da1552c
commit a69433e8de
21 changed files with 220 additions and 71 deletions

View file

@ -29,5 +29,21 @@ feature 'on backoffice page' do
expect(page).to have_css('#backoffice_dossier_show')
end
end
context 'when gestionnaire have enterprise and individual dossier in his inbox' do
let!(:procedure_individual) { create :procedure, libelle: 'procedure individual', administrateur: administrateur, for_individual: true }
let!(:dossier_individual) { create :dossier, procedure: procedure_individual, state: 'updated' }
before do
create :assign_to, gestionnaire: gestionnaire, procedure: procedure_individual
visit backoffice_path
page.click_on dossier_individual.id
end
scenario 'it redirect to dossier page' do
expect(page).to have_css('#backoffice_dossier_show')
end
end
end
end

View file

@ -9,8 +9,8 @@ feature 'user access to the list of his dossier' do
before do
dossier1.update_column(:updated_at, "19/07/2052 15:35".to_time)
dossier1.entreprise.update_column(:raison_sociale, 'PLOP')
last_updated_dossier.entreprise.update_column(:raison_sociale, 'PLIP')
dossier1.procedure.update_column(:libelle, 'PLOP')
last_updated_dossier.procedure.update_column(:libelle, 'PLIP')
visit new_user_session_path
within('#new_user') do
@ -20,12 +20,12 @@ feature 'user access to the list of his dossier' do
end
end
scenario 'the list of dossier is displayed' do
expect(page).to have_content(dossier1.entreprise.raison_sociale)
expect(page).not_to have_content(dossier2.entreprise.raison_sociale)
expect(page).to have_content(dossier1.procedure.libelle)
expect(page).not_to have_content(dossier2.procedure.libelle)
end
scenario 'the list must be order by last updated' do
expect(page.body).to match(/#{last_updated_dossier.entreprise.raison_sociale}.*#{dossier1.entreprise.raison_sociale}/m)
expect(page.body).to match(/#{last_updated_dossier.procedure.libelle}.*#{dossier1.procedure.libelle}/m)
end
scenario 'the state of dossier is displayed' do
@ -34,7 +34,7 @@ feature 'user access to the list of his dossier' do
context 'when user clicks on a projet in list' do
before do
page.click_on dossier1.entreprise.raison_sociale
page.click_on dossier1.procedure.libelle
end
scenario 'user is redirected to dossier page' do
expect(page).to have_css('#recap_dossier')