mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
refactor: helpers.loginUser to be fully async
This commit is contained in:
@@ -150,7 +150,6 @@ describe('email confirmation (v3 api)', () => {
|
||||
resolve({ jar, response, body });
|
||||
});
|
||||
});
|
||||
const login = util.promisify(helpers.loginUser);
|
||||
|
||||
before(async () => {
|
||||
// If you're running this file directly, uncomment these lines
|
||||
@@ -219,7 +218,7 @@ describe('email confirmation (v3 api)', () => {
|
||||
it('should still confirm the email (as email is set in user hash)', async () => {
|
||||
await user.email.remove(userObj.uid);
|
||||
await user.setUserField(userObj.uid, 'email', 'test@example.org');
|
||||
({ jar } = await login('email-test', 'abcdef')); // email removal logs out everybody
|
||||
({ jar } = await helpers.loginUser('email-test', 'abcdef')); // email removal logs out everybody
|
||||
await groups.join('administrators', userObj.uid);
|
||||
|
||||
const { res, body } = await helpers.request('post', `/api/v3/users/${userObj.uid}/emails/${encodeURIComponent('test@example.org')}/confirm`, {
|
||||
|
||||
Reference in New Issue
Block a user