diff --git a/src/__tests__/CustomInput.spec.js b/src/__tests__/CustomInput.spec.js index e851bdcad..d9ed75e41 100644 --- a/src/__tests__/CustomInput.spec.js +++ b/src/__tests__/CustomInput.spec.js @@ -274,6 +274,18 @@ describe('Custom Inputs', () => { expect(onChange).toHaveBeenCalled(); }); }); + + it('removes fakepath from file name', () => { + const file = mount(); + + file.find('input').hostNodes().simulate('change', { + target:{ + value:'C:\\fakepath\\test.txt' + } + }); + + expect(file.find('.custom-file-label').text()).toBe('test.txt'); + }); }); describe('CustomRange', () => {