import React from 'react';
import { render } from '@testing-library/react';
import FormTestBase from './FormTestBase';
import SubmitFormButton from '../SubmitFormButton';

describe('SubmitFormButton', () => {
  it('renders without crashing', () => {
    render(<FormTestBase>{() => <SubmitFormButton />}</FormTestBase>);
  });

  it('has matching snapshot', () => {
    const renderResult = render(
      <FormTestBase>{() => <SubmitFormButton />}</FormTestBase>
    );
    expect(renderResult.asFragment()).toMatchSnapshot();
  });
});
