Fixing dossier edition spec, cannot find why vcr erros

This commit is contained in:
JC 2017-01-03 12:11:29 +01:00
parent 26db1d377e
commit 7ac829becb
2 changed files with 3 additions and 9 deletions

View file

@ -23,6 +23,7 @@ feature 'As a User I wanna create a dossier', js: true do
fill_in 'champs_1', with: 'contenu du champ 1'
page.find_by_id('suivant').trigger('click')
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s), only_path: true)
binding.pry
end
scenario 'Identification through siret', vcr: {cassette_name: 'search_ban_paris'} do

View file

@ -4,17 +4,10 @@ feature 'As a User I want to edit a dossier I own', js: true do
let(:user) { create(:user) }
let(:procedure_for_individual) { create(:procedure, :published, :for_individual, :with_api_carto, :with_type_de_champ, :with_two_type_de_piece_justificative) }
let!(:dossier) { create(:dossier, :with_entreprise, procedure: procedure_for_individual, user: user, state: 'initiated') }
before "Create dossier" do
before "Create dossier and visit root path" do
login_as user, scope: :user
visit commencer_path(procedure_path: procedure_for_individual.path)
fill_in 'dossier_individual_attributes_nom', with: 'Nom'
fill_in 'dossier_individual_attributes_prenom', with: 'Prenom'
fill_in 'dossier_individual_attributes_birthdate', with: '14/10/1987'
find(:css, "#dossier_autorisation_donnees[value='1']").set(true)
page.find_by_id('etape_suivante').trigger('click')
page.find_by_id('etape_suivante').trigger('click')
page.find_by_id('suivant').trigger('click')
visit root_path
end