fix: 归档删除改为软删除
This commit is contained in:
@@ -28,6 +28,16 @@ describe('schedule attendance window validation', () => {
|
||||
const errors = await validate(dto);
|
||||
expect(errors.some((error) => error.property === 'attendanceAdvanceMinutes')).toBe(true);
|
||||
});
|
||||
|
||||
it('accepts only supported schedule statuses when updating', async () => {
|
||||
const inactive = Object.assign(new UpdateScheduleDto(), { status: 'inactive' });
|
||||
const cancelled = Object.assign(new UpdateScheduleDto(), { status: 'cancelled' });
|
||||
const paused = Object.assign(new UpdateScheduleDto(), { status: 'paused' });
|
||||
|
||||
expect((await validate(inactive)).some((error) => error.property === 'status')).toBe(false);
|
||||
expect((await validate(cancelled)).some((error) => error.property === 'status')).toBe(false);
|
||||
expect((await validate(paused)).some((error) => error.property === 'status')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('schedule notes validation', () => {
|
||||
|
||||
Reference in New Issue
Block a user