Spec: specify locked logic
This commit is contained in:
parent
1b14d85c77
commit
08bb393ced
2 changed files with 22 additions and 0 deletions
|
@ -13,6 +13,17 @@ feature 'Signin in:' do
|
|||
expect(page).to have_current_path dossiers_path
|
||||
end
|
||||
|
||||
scenario 'an existing user can lock its account' do
|
||||
visit root_path
|
||||
click_on 'Connexion'
|
||||
|
||||
5.times { sign_in_with user.email, 'bad password' }
|
||||
expect(user.reload.access_locked?).to be false
|
||||
|
||||
sign_in_with user.email, 'bad password'
|
||||
expect(user.reload.access_locked?).to be true
|
||||
end
|
||||
|
||||
context 'when visiting a procedure' do
|
||||
let(:procedure) { create :simple_procedure, :with_service }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue