fix: e2e tests

This commit is contained in:
David Nguyen
2024-02-22 22:58:51 +11:00
parent 306e5ff31f
commit a58fee2da6
3 changed files with 49 additions and 23 deletions

View File

@ -32,3 +32,22 @@ export const unseedUser = async (userId: number) => {
},
});
};
export const unseedUserByEmail = async (email: string) => {
await prisma.user.delete({
where: {
email,
},
});
};
export const extractUserVerificationToken = async (email: string) => {
return await prisma.verificationToken.findFirstOrThrow({
where: {
identifier: 'confirmation-email',
user: {
email,
},
},
});
};