import { describe, expect, it } from "vitest";
import { getSeedTenantIds, isSeedTenant } from "./protectedTenants";

describe("protectedTenants", () => {
  it("marks tenants from seed-tenant.csv as protected by UUID", () => {
    expect(getSeedTenantIds()).toEqual(
      expect.arrayContaining([
        "038326b6-954a-48a7-a85f-efd83f62b82a",
        "5a03efd2-e62f-4243-800d-58334bf48b2f",
        "9607eb7b-04d2-42ab-80fe-780fe21c7e8f",
      ]),
    );
    expect(
      isSeedTenant({
        id: "5a03efd2-e62f-4243-800d-58334bf48b2f",
      }),
    ).toBe(true);
    expect(
      isSeedTenant({
        id: "5A03EFD2-E62F-4243-800D-58334BF48B2F",
      }),
    ).toBe(true);
    expect(isSeedTenant({ id: "normal-tenant" })).toBe(false);
  });
});
