import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { ProfileCard } from "./ProfileCard";

describe("ProfileCard", () => {
  it("renders profile info and avatar", () => {
    render(
      <ProfileCard
        email="user@example.com"
        displayName="Compton User"
        avatarUrl="/api/v1/media/files/avatars/u/1.png"
      />
    );
    expect(screen.getByText("Compton User")).toBeInTheDocument();
    expect(screen.getByText("user@example.com")).toBeInTheDocument();
    expect(screen.getByRole("img", { name: "Compton User avatar" })).toBeInTheDocument();
  });
});
