mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
test: validate email sending (#58889)
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,8 @@ const {
|
||||
publicUser,
|
||||
fullyCertifiedUser,
|
||||
userIds,
|
||||
almostFullyCertifiedUser
|
||||
almostFullyCertifiedUser,
|
||||
unclaimedUser
|
||||
} = require('./user-data');
|
||||
|
||||
const options = {
|
||||
@@ -20,7 +21,8 @@ const options = {
|
||||
'set-false': { type: 'string', multiple: true },
|
||||
'seed-trophy-challenges': { type: 'boolean' },
|
||||
'certified-user': { type: 'boolean' },
|
||||
'almost-certified-user': { type: 'boolean' }
|
||||
'almost-certified-user': { type: 'boolean' },
|
||||
'unclaimed-user': { type: 'boolean' }
|
||||
};
|
||||
|
||||
const { values: argValues } = parseArgs({ options });
|
||||
@@ -127,6 +129,8 @@ const run = async () => {
|
||||
await user.insertOne(fullyCertifiedUser);
|
||||
} else if (argValues['almost-certified-user']) {
|
||||
await user.insertOne(almostFullyCertifiedUser);
|
||||
} else if (argValues['unclaimed-user']) {
|
||||
await user.insertOne(unclaimedUser);
|
||||
} else {
|
||||
await user.insertOne(demoUser);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,15 @@ const publicUserId = new ObjectId('663b839b24a8b29f57728b13');
|
||||
const demoUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb5');
|
||||
const fullyCertifiedUserId = new ObjectId('5fa2db00a25c1c1fa49ce067');
|
||||
const almostFullyCertifiedUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb9');
|
||||
const unclaimedUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb1');
|
||||
|
||||
const userIds = [
|
||||
blankUserId,
|
||||
publicUserId,
|
||||
demoUserId,
|
||||
fullyCertifiedUserId,
|
||||
almostFullyCertifiedUserId
|
||||
almostFullyCertifiedUserId,
|
||||
unclaimedUserId
|
||||
];
|
||||
|
||||
module.exports.blankUser = {
|
||||
@@ -12293,6 +12295,12 @@ module.exports.fullyCertifiedUser = {
|
||||
unsubscribeId: 'tBX8stC5jiustPBteF2mV'
|
||||
};
|
||||
|
||||
module.exports.unclaimedUser = {
|
||||
...module.exports.fullyCertifiedUser,
|
||||
id: unclaimedUserId,
|
||||
isFrontEndLibsCert: false
|
||||
};
|
||||
|
||||
module.exports.almostFullyCertifiedUser = {
|
||||
...module.exports.fullyCertifiedUser,
|
||||
id: almostFullyCertifiedUserId,
|
||||
|
||||
Reference in New Issue
Block a user