feat: add агегку events
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
jest.mock('../prisma/prisma.service', () => ({
|
||||
PrismaService: class PrismaService {},
|
||||
}));
|
||||
|
||||
import { UpcomingEventsController } from './upcoming-events.controller';
|
||||
|
||||
describe('UpcomingEventsController', () => {
|
||||
it('passes the authenticated user and account to the service', async () => {
|
||||
const events = { get: jest.fn() };
|
||||
const controller = new UpcomingEventsController(events as never);
|
||||
await controller.get({ user: { sub: 'user' } } as never, 'account');
|
||||
expect(events.get).toHaveBeenCalledWith('user', 'account');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user