mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
test: fix email tests @julianlam
This commit is contained in:
@@ -427,6 +427,7 @@ describe('Controllers', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should reject an email that comprises only whitespace', async () => {
|
it('should reject an email that comprises only whitespace', async () => {
|
||||||
|
meta.config.requireEmailAddress = 1;
|
||||||
const uid = await user.create({ username: utils.generateUUID().slice(0, 10) });
|
const uid = await user.create({ username: utils.generateUUID().slice(0, 10) });
|
||||||
const result = await user.interstitials.email({
|
const result = await user.interstitials.email({
|
||||||
userData: { uid: uid, updateEmail: true },
|
userData: { uid: uid, updateEmail: true },
|
||||||
@@ -488,6 +489,7 @@ describe('Controllers', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should remove current email', async () => {
|
it('should remove current email', async () => {
|
||||||
|
meta.config.requireEmailAddress = 0;
|
||||||
const uid = await user.create({ username: 'interstiuser5' });
|
const uid = await user.create({ username: 'interstiuser5' });
|
||||||
await user.setUserField(uid, 'email', 'interstiuser5@nodebb.org');
|
await user.setUserField(uid, 'email', 'interstiuser5@nodebb.org');
|
||||||
await user.email.confirmByUid(uid);
|
await user.email.confirmByUid(uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user