feat: integrate analytics and fragment receipt improvements
This commit is contained in:
@@ -38,6 +38,22 @@ describe('CertificationService', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('filters enterprise certification submissions by Shanghai date range', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
const service = new CertificationService(prisma as never);
|
||||
|
||||
await service.list(undefined, 'pending', undefined, '2026-08-01', '2026-08-03');
|
||||
|
||||
expect(prisma.enterpriseCertification.findMany).toHaveBeenCalledWith(expect.objectContaining({
|
||||
where: expect.objectContaining({
|
||||
submittedAt: {
|
||||
gte: new Date('2026-08-01T00:00:00+08:00'),
|
||||
lte: new Date('2026-08-03T23:59:59.999+08:00'),
|
||||
},
|
||||
}),
|
||||
}));
|
||||
});
|
||||
|
||||
it('submits certification and marks tenant pending', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
const service = new CertificationService(prisma as never);
|
||||
|
||||
Reference in New Issue
Block a user