Allow define maximum_attemps and unlock_in
This commit is contained in:
@@ -8,7 +8,7 @@ describe Users::SessionsController do
|
||||
describe "Devise lock" do
|
||||
context "when devise sign in maximum_attempts reached", :with_frozen_time do
|
||||
it "locks the user account and sends an email to the account with an unlock link" do
|
||||
user.update(failed_attempts: 19)
|
||||
allow(User).to receive(:maximum_attempts).and_return(1)
|
||||
|
||||
expect do
|
||||
post :create, params: { user: { login: "citizen@consul.org", password: "wrongpassword" }}
|
||||
|
||||
Reference in New Issue
Block a user