2019-08-09 10:08:59 -05:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
import { QueryField } from './QueryField';
|
|
|
|
|
|
|
|
describe('<QueryField />', () => {
|
2019-08-14 07:37:04 -05:00
|
|
|
it('should render with null initial value', () => {
|
2019-08-09 10:08:59 -05:00
|
|
|
const wrapper = shallow(<QueryField initialQuery={null} />);
|
|
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
|
|
});
|
2019-08-14 07:37:04 -05:00
|
|
|
|
|
|
|
it('should render with empty initial value', () => {
|
2019-08-09 10:08:59 -05:00
|
|
|
const wrapper = shallow(<QueryField initialQuery="" />);
|
|
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
|
|
});
|
2019-08-14 07:37:04 -05:00
|
|
|
|
|
|
|
it('should render with initial value', () => {
|
2019-08-09 10:08:59 -05:00
|
|
|
const wrapper = shallow(<QueryField initialQuery="my query" />);
|
|
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|