it('should throw if user roles are missing', async ({ trpcContextMock }) => {
const ctx = await createInnerTRPCContext(
trpcContextMock({ authorisation: { userSecurityGroups: [] } }),
)
const caller = appRouter.createCaller(ctx)
await expect(caller.locations.searchLocations({})).rejects.toThrowError(
'User roles are missing',
)
})
it('should throw if user roles are missing', async ({ trpcContextMock }) => {
const ctx = await createInnerTRPCContext(
trpcContextMock({ authorisation: { userSecurityGroups: [] } }),
)
const caller = appRouter.createCaller(ctx)
await expect(caller.locations.searchLocations({})).rejects.toThrowError(
'User roles are missing',
)
})