import { describe, expect, it } from 'vitest';
import { render, screen } from '@testing-library/react';
import { StatusBadge } from '@/components/StatusBadge';

describe('StatusBadge', () => {
  it.each(['planned', 'active', 'closed'] as const)('renders %s label and data attr', (status) => {
    render(<StatusBadge status={status} />);
    const badge = screen.getByTestId('status-badge');
    expect(badge).toHaveAttribute('data-status', status);
    expect(badge.textContent?.toLowerCase()).toBe(status);
  });
});
