fix permissions and teacher attendance workflows

This commit is contained in:
2026-07-10 20:40:52 +08:00
parent 247879f276
commit 8ed1682b90
95 changed files with 4745 additions and 1237 deletions

View File

@@ -0,0 +1,22 @@
import { SyncController } from './sync.controller';
describe('SyncController — schedule sync options', () => {
it('forwards the attendance-machine-only option', async () => {
const syncService = {
syncScheduleToDingTalk: jest.fn().mockResolvedValue({ syncedItems: 0 }),
};
const controller = new SyncController(syncService as never);
await (controller.syncSchedule as unknown as (
dateFrom?: string,
days?: string,
attendanceMachineOnly?: string,
) => Promise<unknown>)('2026-07-10', '30', 'true');
expect(syncService.syncScheduleToDingTalk).toHaveBeenCalledWith(
'2026-07-10',
30,
true,
);
});
});