feat(events): support date range filtering

This commit is contained in:
2026-09-12 11:57:41 +03:00
parent 235c179ff8
commit a79f59a468
6 changed files with 283 additions and 25 deletions
+8 -2
View File
@@ -8,7 +8,13 @@ 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');
await controller.get({ user: { sub: 'user' } } as never, 'account', {
from: '2026-09-01',
to: '2026-09-30',
});
expect(events.get).toHaveBeenCalledWith('user', 'account', {
from: '2026-09-01',
to: '2026-09-30',
});
});
});