mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 04:56:17 +00:00
Fixed wrong value passed to DateInput
This commit is contained in:
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import DateInput from '../../src/common/DateInput';
|
||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import moment from 'moment';
|
||||
|
||||
describe('<DateInput />', () => {
|
||||
let wrapped;
|
||||
@@ -32,7 +33,7 @@ describe('<DateInput />', () => {
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user