fix: clarify client amounts and log date filters
This commit is contained in:
@@ -890,6 +890,22 @@ describe('OperationsService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('applies an explicit Beijing date interval to operation logs', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
const service = new OperationsService(prisma as never);
|
||||
|
||||
await service.systemLogs({ createdAtFrom: '2026-08-21', createdAtTo: '2026-08-27' });
|
||||
|
||||
expect(prisma.operationLog.findMany).toHaveBeenCalledWith(expect.objectContaining({
|
||||
where: expect.objectContaining({
|
||||
createdAt: {
|
||||
gte: new Date('2026-08-20T16:00:00.000Z'),
|
||||
lte: new Date('2026-08-27T15:59:59.999Z'),
|
||||
},
|
||||
}),
|
||||
}));
|
||||
});
|
||||
|
||||
it('exports filtered operation logs with a traceable operation id', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
const service = new OperationsService(prisma as never);
|
||||
|
||||
Reference in New Issue
Block a user