merge userdb.js into users.js

This commit is contained in:
Girish Ramakrishnan
2021-07-15 09:50:11 -07:00
parent 2840bba4bf
commit a1c61facdc
27 changed files with 1021 additions and 1456 deletions

View File

@@ -202,14 +202,11 @@ describe('Profile API', function () {
});
it('can enable 2fa', async function () {
const totpToken = speakeasy.totp({
secret: secret,
encoding: 'base32'
});
const totpToken = speakeasy.totp({ secret, encoding: 'base32' });
await superagent.post(`${serverUrl}/api/v1/profile/twofactorauthentication_enable`)
.query({ access_token: user.token })
.send({ totpToken: totpToken });
.send({ totpToken });
});
it('fails due to missing token', async function () {