Add report options and profile sharing support
هذا الالتزام موجود في:
@@ -13,3 +13,22 @@ describe('UsersController artist dashboard', () => {
|
||||
expect(result).toEqual({ profile: { _id: 'user-1' } });
|
||||
});
|
||||
});
|
||||
|
||||
describe('UsersController profile lookup', () => {
|
||||
it('uses the authenticated user id when loading profile overview by username', async () => {
|
||||
const usersService = {
|
||||
getProfileOverviewByUsername: jest.fn().mockResolvedValue({
|
||||
profileShareUrl: 'https://oudelaa.com/u/artist',
|
||||
}),
|
||||
};
|
||||
const controller = new UsersController(usersService as any);
|
||||
|
||||
const result = await controller.getProfileOverviewByUsername(
|
||||
{ sub: 'viewer-1' } as any,
|
||||
'artist',
|
||||
);
|
||||
|
||||
expect(usersService.getProfileOverviewByUsername).toHaveBeenCalledWith('artist', 'viewer-1');
|
||||
expect(result).toEqual({ profileShareUrl: 'https://oudelaa.com/u/artist' });
|
||||
});
|
||||
});
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم