mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +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 { 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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user