import React from 'react';
import { render } from '@testing-library/react';
import { useAxiosRequestProps } from 'envoc-request';
import ConfirmBaseForm from './ConfirmBaseForm';

describe('ConfirmBaseForm', () => {
  it('Renders without error', () => {
    render(<ConfirmBaseForm request={confirmBaseFormRequest} />);
  });

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

const confirmBaseFormRequest = {
  method: 'get',
  url: `/boop`,
  onComplete: () => {},
  onError: () => {},
} as useAxiosRequestProps;
