refactor driver module (wip)

This commit is contained in:
2025-12-22 10:24:40 +01:00
parent e7dbec4a85
commit 9da528d5bd
108 changed files with 842 additions and 947 deletions

View File

@@ -217,7 +217,7 @@ describe('MediaController', () => {
describe('updateAvatar', () => {
it('should update avatar and return result', async () => {
const driverId = 'driver-123';
const input = { mediaUrl: 'https://example.com/new-avatar.png' } as UpdateAvatarOutputDTO;
const input: UpdateAvatarInputDTO = { avatarUrl: 'https://example.com/new-avatar.png' };
const dto: UpdateAvatarOutputDTO = {
success: true,
};
@@ -225,9 +225,9 @@ describe('MediaController', () => {
const res = createMockResponse();
await controller.updateAvatar(driverId, input as any, res);
await controller.updateAvatar(driverId, input, res);
expect(service.updateAvatar).toHaveBeenCalledWith(driverId, input as any);
expect(service.updateAvatar).toHaveBeenCalledWith(driverId, input);
expect(res.status).toHaveBeenCalledWith(200);
expect(res.json).toHaveBeenCalledWith(dto);
});