refactor driver module (wip)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user