go to procedure after cliking link

even for an instructeur which is not signed in and unstrusted
This commit is contained in:
Christophe Robillard 2020-03-17 21:31:35 +01:00
parent 4cc17453f9
commit 795eabb1ea
3 changed files with 14 additions and 1 deletions

View file

@ -110,4 +110,16 @@ feature 'Creating a new dossier:' do
end
end
end
context 'when the user is not signed in' do
let(:instructeur) { create(:instructeur) }
let(:procedure) { create(:procedure, :published) }
scenario 'the user is an instructeur with untrusted device' do
visit commencer_path(path: procedure.path)
click_on "Jai déjà un compte"
sign_in_with(instructeur.email, instructeur.user.password, true)
expect(page).to have_current_path(commencer_path(path: procedure.path))
end
end
end