import { FakeAuthRepository } from '@app/testing/domain/authentification/fake-auth.repository';
import { LogoutUseCase } from '@app/application/authentification/logout.usecase';
import { mockUsers } from '@app/testing/user.mock';

describe('LogoutUsecase', () => {
  it("devrait supprimer les infos de l'utilisateur en cache ", async () => {
    const repo = new FakeAuthRepository();
    const useCase = new LogoutUseCase(repo);

    expect(mockUsers[0]).toBeTruthy();

    useCase.execute();

    expect(mockUsers[0]).toBeUndefined();
    expect(mockUsers.length).toBe(0);
  });
});
