From 09d6c1eb9ed2fba65b03e9805e5531cd3aed361e Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Wed, 11 Oct 2023 21:07:31 -0700 Subject: [PATCH] fix(tools): update report user test (#51919) --- api/src/routes/user.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/routes/user.test.ts b/api/src/routes/user.test.ts index 8cc38028ac2..e1ae37c1793 100644 --- a/api/src/routes/user.test.ts +++ b/api/src/routes/user.test.ts @@ -631,6 +631,9 @@ describe('userRoutes', () => { }); test('POST returns 200 status code with "success" message', async () => { + const testUser = await fastifyTestInstance.prisma.user.findFirst({ + where: { email: testUserData.email } + }); const response = await superRequest('/user/report-user', { method: 'POST', setCookies @@ -656,7 +659,7 @@ Luke, I am your father Reported by: -Username: +Username: ${testUser?.username ?? ''} Name: Email: foo@bar.com