Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
as1729 committed Dec 16, 2023
1 parent 3255800 commit e89d8f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/directives/requireAuth/requireAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down

0 comments on commit e89d8f4

Please sign in to comment.