forked from wangziqi/gongxue-base
Squash merge PR #23. Included changes: - complete occupancy check-in required fields/default payload - improve responsive admin management pages - fix attendance edge cases and attendance period config - refine wallet/finance-related workflow handling Checks: - npm run typecheck -w apps/admin - npm run typecheck -w apps/server
24 lines
704 B
TypeScript
24 lines
704 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { buildDingTalkConfigPayload, isAppSecretRequired } from './integration-config-form';
|
|
|
|
describe('DingTalk integration config form', () => {
|
|
it('requires AppSecret only for the first configuration', () => {
|
|
expect(isAppSecretRequired(false)).toBe(true);
|
|
expect(isAppSecretRequired(true)).toBe(false);
|
|
});
|
|
|
|
it('builds a manual-sync config without the retired startEnable flag', () => {
|
|
expect(
|
|
buildDingTalkConfigPayload({
|
|
corpId: 'ding-corp',
|
|
agentId: 'app-key',
|
|
appSecret: '',
|
|
}),
|
|
).toEqual({
|
|
corpId: 'ding-corp',
|
|
agentId: 'app-key',
|
|
appSecret: undefined,
|
|
});
|
|
});
|
|
});
|