From e89d8f43270762a67581e05c0c89d3443c860a20 Mon Sep 17 00:00:00 2001 From: Aditya Sridhar Date: Fri, 15 Dec 2023 19:16:41 -0500 Subject: [PATCH] fix: test --- api/src/directives/requireAuth/requireAuth.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/directives/requireAuth/requireAuth.test.ts b/api/src/directives/requireAuth/requireAuth.test.ts index 0f01aa36..88bbf88b 100644 --- a/api/src/directives/requireAuth/requireAuth.test.ts +++ b/api/src/directives/requireAuth/requireAuth.test.ts @@ -9,9 +9,9 @@ describe('requireAuth directive', () => { }) it('requireAuth has stub implementation. Should not throw when current user', () => { - // If you want to set values in context, pass it through e.g. - // mockRedwoodDirective(requireAuth, { context: { currentUser: { id: 1, name: 'Lebron McGretzky' } }}) - const mockExecution = mockRedwoodDirective(requireAuth, { context: {} }) + const mockExecution = mockRedwoodDirective(requireAuth, { + context: { currentUser: { id: 1, name: 'Some User' } }, + }) expect(mockExecution).not.toThrowError() })