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

describe('AddressInput', () => {
  it('renders without crashing', () => {
    render(
      <FormTestBase>
        {({ Field }) => (
          <AddressInput fieldBuilder={{ Field }} name="normalAddressInput" />
        )}
      </FormTestBase>
    );
  });

  it('has matching snapshot', () => {
    const renderResult = render(
      <FormTestBase>
        {({ Field }) => (
          <AddressInput fieldBuilder={{ Field }} name="normalAddressInput" />
        )}
      </FormTestBase>
    );
    expect(renderResult.asFragment()).toMatchSnapshot();
  });
});
