merge userdb.js into users.js
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user