import { describe, expect, it } from "vitest";
import { getHeaderController } from "@/interface-adapters/controllers/get-header.controller";
import { getHeaderUseCase } from "@/application/use-cases/get-header.use-case";
import { MockHeaderRepository } from "@/infrastructure/repositories/header.repository.mock";

describe("getHeaderController", () => {
  it("returns the header with items", async () => {
    const repo = new MockHeaderRepository();
    const useCase = getHeaderUseCase(repo);
    const controller = getHeaderController(useCase);

    const result = await controller({});

    expect(result.items.length).toBeGreaterThan(0);
    expect(result.items[0]?.label).toBe("Home");
  });
});
