From d6e6c8c6c2e42f50228c483ca144227e54a43437 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 12 Aug 2018 10:18:26 +0200 Subject: [PATCH] Fixed wrong value passed to DateInput --- test/common/DateInput.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/common/DateInput.test.js b/test/common/DateInput.test.js index fe68ece9..a2df216e 100644 --- a/test/common/DateInput.test.js +++ b/test/common/DateInput.test.js @@ -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('', () => { let wrapped; @@ -32,7 +33,7 @@ describe('', () => { }); 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); }); });