import { UsersController } from './users.controller';

describe('UsersController artist dashboard', () => {
  it('uses the authenticated user id for the private dashboard endpoint', async () => {
    const usersService = {
      getMyDashboard: jest.fn().mockResolvedValue({ profile: { _id: 'user-1' } }),
    };
    const controller = new UsersController(usersService as any);

    const result = await controller.getMyDashboard({ sub: 'user-1' } as any);

    expect(usersService.getMyDashboard).toHaveBeenCalledWith('user-1');
    expect(result).toEqual({ profile: { _id: 'user-1' } });
  });
});
