aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/forms/legend/legend.test.tsx
blob: 7abb99671de275c669d7b2428249ad51b6ee8579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { render, screen } from '../../../../../tests/utils';
import { Fieldset } from '../fieldset';
import { Legend } from './legend';

describe('legend', () => {
  it('renders the fieldset legend', () => {
    const body = 'deserunt';

    render(
      <Fieldset>
        <Legend>{body}</Legend>
      </Fieldset>
    );

    expect(screen.getByRole('group')).toHaveTextContent(body);
  });
});