import { render, screen } from '@testing-library/react';
import { ThemeProvider } from '../../theme';
import AdminEmptyState from './AdminEmptyState';

describe('<AdminEmptyState/>', () => {
  const wrap = (ui: React.ReactNode) => render(<ThemeProvider>{ui}</ThemeProvider>);

  it('renders the title and body', () => {
    wrap(<AdminEmptyState title="Queue clear" body="Nothing to review" />);
    expect(screen.getByText('Queue clear')).toBeInTheDocument();
    expect(screen.getByText('Nothing to review')).toBeInTheDocument();
  });

  it('renders without a body', () => {
    wrap(<AdminEmptyState title="Empty" />);
    expect(screen.getByText('Empty')).toBeInTheDocument();
  });
});
