import React from 'react';

import Select from './index';

const data = {
  label: 'Select',
  name: 'select',
  value: 'select',
};

describe('Select', () => {
  const defaultElement = <Select {...data} />;
  let wrapper;

  beforeEach(() => {
    wrapper = shallow(defaultElement);
  });

  it('should render correctly', () => {
    expect(wrapper).toMatchSnapshot();
  });

  it('should render a required select', () => {
    wrapper.setProps({ required: true });
    expect(wrapper).toMatchSnapshot();
  });
});
