import React from 'react';
import renderWithTheme from '../../../testUtils/renderWithTheme';

import CardHeader from '../CardHeader';
import Card from '..';

describe('rendering', () => {
  it('renders card header', () => {
    const { getByText } = renderWithTheme(
      <Card>
        <CardHeader content="Header of the card" />
      </Card>
    );
    expect(getByText('Header of the card')).toBeInTheDocument();
  });

  it('renders custom card header', () => {
    const { getByText } = renderWithTheme(
      <Card>
        <CardHeader>
          <p>Custom header</p>
        </CardHeader>
      </Card>
    );
    expect(getByText('Custom header')).toBeInTheDocument();
  });
});
