demarches-normaliennes/spec/controllers/super_admins/passwords_controller_spec.rb
2020-12-15 16:26:09 +01:00

12 lines
369 B
Ruby

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