/* eslint-env jest */
import React from 'react';
import { render } from 'enzyme';
import { Provider } from 'react-redux';
import configureStore from 'redux-mock-store';
const mockStore = configureStore();
import ReceiveOfferForm from './index';

it('renders correctly with approval', () => {
    const store = mockStore({});
    store.dispatch = jest.fn();
    const tree = render(
        <Provider store={store}>
            <ReceiveOfferForm displayApproval={true} />
        </Provider>
    );

    expect(tree).toMatchSnapshot();
});

it('renders correctly without approval', () => {
    const store = mockStore({});
    store.dispatch = jest.fn();
    const tree = render(
        <Provider store={store}>
            <ReceiveOfferForm displayApproval={false} />
        </Provider>
    );

    expect(tree).toMatchSnapshot();
});
