mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(api): generate required properties for new users (#51822)
This commit is contained in:
committed by
GitHub
parent
fac5c52be2
commit
948b7c52c2
+3
-4
@@ -1,7 +1,7 @@
|
||||
import request from 'supertest';
|
||||
|
||||
import { build } from './src/app';
|
||||
import { defaultUser } from './src/utils/default-user';
|
||||
import { createUserInput } from './src/utils/create-user';
|
||||
|
||||
type FastifyTestInstance = Awaited<ReturnType<typeof build>>;
|
||||
|
||||
@@ -84,9 +84,8 @@ export async function devLogin(): Promise<string[]> {
|
||||
|
||||
await fastifyTestInstance.prisma.user.create({
|
||||
data: {
|
||||
...defaultUser,
|
||||
id: defaultUserId,
|
||||
email: defaultUserEmail
|
||||
...createUserInput(defaultUserEmail),
|
||||
id: defaultUserId
|
||||
}
|
||||
});
|
||||
const res = await superRequest('/auth/dev-callback', { method: 'GET' });
|
||||
|
||||
Reference in New Issue
Block a user