fix(occupancies): assign room resources during transfers

This commit is contained in:
2026-07-13 12:01:48 +08:00
parent 8cadf8970e
commit 2874ab7bee
6 changed files with 156 additions and 13 deletions

View File

@@ -28,7 +28,10 @@ describe('OccupanciesService — responsible organization', () => {
roomRepo,
studentRepo,
{} as Repository<Deposit>,
{} as Repository<Bed>,
{
findOne: jest.fn().mockResolvedValue({ id: 4, roomId: 2, status: 'available' }),
update: jest.fn(),
} as any as Repository<Bed>,
{} as Repository<Locker>,
{} as Repository<any>,
{} as DataSource,
@@ -38,6 +41,7 @@ describe('OccupanciesService — responsible organization', () => {
studentId: 3,
roomId: 2,
checkInDate: '2026-07-10',
bedId: 4,
});
expect(occupancyRepo.create).toHaveBeenCalledWith(