import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";

import { LockedImageMessageCard } from "../locked-image-message-card";

describe("LockedImageMessageCard", () => {
  it("renders the promotion hint and an enabled unlock action", () => {
    const html = renderToStaticMarkup(
      <LockedImageMessageCard
        hint="Unlock this private photo."
        onUnlock={() => undefined}
      />,
    );

    expect(html).toContain('aria-label="Locked private image"');
    expect(html).toContain("Unlock this private photo.");
    expect(html).toContain("Unlock private image");
    expect(html).not.toContain(' disabled=""');
  });
});
