feat: remove legacy signature confirmation
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { millisecondsUntilShanghaiHour, SignatureRetirementService } from './signature-retirement.service';
|
||||
import { BadRequestException } from '@nestjs/common';
|
||||
|
||||
describe('SignatureRetirementService dimensions', () => {
|
||||
const service = new SignatureRetirementService({} as never);
|
||||
@@ -34,15 +33,6 @@ describe('SignatureRetirementService dimensions', () => {
|
||||
expect(dimensions).toEqual([]);
|
||||
});
|
||||
|
||||
it('rejects an approved legacy carrier confirmation without an explicit valid approval time', async () => {
|
||||
await expect(service.confirmLegacyReport('legacy-1', {
|
||||
results: [{ carrier: 'mobile', status: 'approved' }],
|
||||
})).rejects.toBeInstanceOf(BadRequestException);
|
||||
await expect(service.confirmLegacyReport('legacy-1', {
|
||||
results: [{ carrier: 'mobile', status: 'approved', approvedAt: 'not-a-date' }],
|
||||
})).rejects.toBeInstanceOf(BadRequestException);
|
||||
});
|
||||
|
||||
it('schedules the next Beijing 04:00 and 08:00 precisely', () => {
|
||||
expect(millisecondsUntilShanghaiHour(new Date('2026-08-09T19:00:00.000Z'), 4)).toBe(60 * 60_000);
|
||||
expect(millisecondsUntilShanghaiHour(new Date('2026-08-09T21:00:00.000Z'), 4)).toBe(23 * 60 * 60_000);
|
||||
|
||||
Reference in New Issue
Block a user