content: import React from 'react';
  import { bindActionCreators } from 'redux';
  import DatePicker from '../../../src/components/common/DatePicker';
  import { shallow, mount } from 'enzyme';
  import 'core-js/fn/array/find';
  import moment from 'moment';
  
  describe('(Component) DatePicker', () => {
  
    let _props, _spies, _wrapper;
  
    beforeEach(() => {
      _spies = {};
      _props = {
        selected: moment(),
        ...bindActionCreators({
          onChange: (_spies.onChange = sinon.spy())
        }, _spies.dispatch = sinon.spy())
      };
  
      _wrapper = shallow(<DatePicker {..._props} />)
    });
  
    it('should call prop onChange in componentDidMount method', () => {
      _spies.dispatch.should.have.not.been.called();
      _spies.onChange.should.have.not.been.called();
  
      mount(<DatePicker {..._props} />);
  
      _spies.dispatch.should.have.been.called();
      _spies.onChange.should.have.been.called();
  
    });
  
    it('should call prop onChange when input changes', () => {
      _spies.dispatch.should.have.not.been.called();
      _spies.onChange.should.have.not.been.called();
  
      _wrapper.simulate('change');
  
      _spies.dispatch.should.have.been.called();
      _spies.onChange.should.have.been.called();
    });
  
    it('should initialize properties correctly', () => {
      expect(_wrapper.props().onChange).to.equal(_props.onChange);
      expect(_wrapper.props().selected).to.equal(_props.selected);
    });
  });
  