import { ListProfilesUseCase } from '@app/application/profiles/list-profiles.usecase';
import { FakeProfileRepository } from '@app/testing/domain/profiles/fake-profile.repository';
import { mockProfilePaginated } from '@app/testing/profile.mock';

describe('ListProfilesUseCase', () => {
  it('doit retourner la liste des profils', () => {
    const repo = new FakeProfileRepository();
    const useCase = new ListProfilesUseCase(repo);

    useCase.execute().subscribe({
      next: (profiles) => {
        expect(profiles.items.length).toBe(2);
        expect(profiles).toEqual(mockProfilePaginated);
      },
    });
  });
});
