test: fix tests so that when user.create is called, email is set prior to confirmation

This commit is contained in:
Julian Lam
2022-08-03 13:02:21 -04:00
parent cba9047f67
commit f93a0b83bb
5 changed files with 56 additions and 40 deletions

View File

@@ -483,7 +483,8 @@ describe('Controllers', () => {
});
it('should remove current email', async () => {
const uid = await user.create({ username: 'interstiuser5', email: 'interstiuser5@nodebb.org' });
const uid = await user.create({ username: 'interstiuser5' });
await user.setUserField(uid, 'email', 'interstiuser5@nodebb.org');
await user.email.confirmByUid(uid);
const result = await user.interstitials.email({