mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Fixed wrong value passed to DateInput
This commit is contained in:
parent
e0ab67899d
commit
d6e6c8c6c2
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
import DateInput from '../../src/common/DateInput';
|
import DateInput from '../../src/common/DateInput';
|
||||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
describe('<DateInput />', () => {
|
describe('<DateInput />', () => {
|
||||||
let wrapped;
|
let wrapped;
|
||||||
|
@ -32,7 +33,7 @@ describe('<DateInput />', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not show calendar icon when input is clearable', () => {
|
it('does not show calendar icon when input is clearable', () => {
|
||||||
wrapped = createComponent({ isClearable: true, selected: '' });
|
wrapped = createComponent({ isClearable: true, selected: moment() });
|
||||||
expect(wrapped.find(FontAwesomeIcon)).toHaveLength(0);
|
expect(wrapped.find(FontAwesomeIcon)).toHaveLength(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue