import React from 'react';
import {render} from '@shared/testingLibrary';

import {RadioButton} from './index';

describe('RadioButton component', () => {
  it('Check if title is rendered', () => {
    const {getByText} = render(<RadioButton title="RadioButton" />);
    expect(getByText('RadioButton')).toBeTruthy();
  });

  it('RadioButton is checked', () => {
    const {getAllByTestId} = render(
      <RadioButton title="RadioButton" checked />,
    );
    expect(getAllByTestId('icon-button-checked')).toBeTruthy();
  });
});
