test: make it work again
This commit is contained in:
@@ -149,7 +149,7 @@ describe('Directory Server (LDAP)', function () {
|
||||
it('totp check not requested - fails with bad password', async function () {
|
||||
const [error] = await safe(ldapBind(`cn=${admin.id},ou=users,dc=cloudron`, admin.password + 'random'));
|
||||
expect(error).to.be.a(ldap.InvalidCredentialsError);
|
||||
expect(error.lde_message).to.be('Username and password does not match');
|
||||
expect(error.lde_message).to.be('Wrong password');
|
||||
});
|
||||
|
||||
it('totp check not requested - succeeds with good password', async function () {
|
||||
@@ -179,13 +179,13 @@ describe('Directory Server (LDAP)', function () {
|
||||
it('totp check requested - fails with bad password if user has 2fa', async function () {
|
||||
const totpToken = speakeasy.totp({ secret: twofa.secret, encoding: 'base32' });
|
||||
const [error] = await safe(ldapBind(`cn=${admin.email}+totpToken=${totpToken},ou=users,dc=cloudron`, admin.password + 'random'));
|
||||
expect(error.lde_message).to.be('Username and password does not match');
|
||||
expect(error.lde_message).to.be('Wrong password');
|
||||
});
|
||||
|
||||
it('totp check requested - fails with bad password if user has no 2fa', async function () {
|
||||
const totpToken = speakeasy.totp({ secret: twofa.secret, encoding: 'base32' });
|
||||
const [error] = await safe(ldapBind(`cn=${admin.email}+totpToken=${totpToken},ou=users,dc=cloudron`, admin.password + 'random'));
|
||||
expect(error.lde_message).to.be('Username and password does not match');
|
||||
expect(error.lde_message).to.be('Wrong password');
|
||||
});
|
||||
|
||||
it('totp check requested - succeeds with valid 2fa', async function () {
|
||||
|
||||
Reference in New Issue
Block a user