forked from wangziqi/gongxue-base
28 lines
784 B
TypeScript
28 lines
784 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import dayjs from 'dayjs';
|
|
import { buildTransferPayload } from './occupancy-form';
|
|
|
|
describe('occupancy transfer form', () => {
|
|
it('submits the target room resources with the transfer dates', () => {
|
|
expect(
|
|
buildTransferPayload({
|
|
newRoomId: 5,
|
|
newBedId: 12,
|
|
newLockerId: 18,
|
|
transferDate: dayjs('2026-07-13'),
|
|
oldBillingEndDate: dayjs('2026-07-13'),
|
|
newBillingStartDate: dayjs('2026-07-14'),
|
|
reason: '调整宿舍',
|
|
}),
|
|
).toEqual({
|
|
newRoomId: 5,
|
|
newBedId: 12,
|
|
newLockerId: 18,
|
|
transferDate: '2026-07-13',
|
|
oldBillingEndDate: '2026-07-13',
|
|
newBillingStartDate: '2026-07-14',
|
|
reason: '调整宿舍',
|
|
});
|
|
});
|
|
});
|