super_admin: check password complexity client side
This commit is contained in:
parent
90d7ee872e
commit
94b3ec942b
4 changed files with 32 additions and 4 deletions
12
spec/controllers/super_admins/passwords_controller_spec.rb
Normal file
12
spec/controllers/super_admins/passwords_controller_spec.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
describe SuperAdmins::PasswordsController, type: :controller do
|
||||
describe '#test_strength' do
|
||||
it 'calculate score' do
|
||||
password = "bonjour"
|
||||
@request.env["devise.mapping"] = Devise.mappings[:super_admin]
|
||||
|
||||
get 'test_strength', xhr: true, params: { super_admin: { password: password } }
|
||||
|
||||
expect(assigns(:score)).to be_present
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue