Skip to content

Commit 23a5b4d

Browse files
committed
Update props.disabled test to assert against render inputs
better to check that the rendered input is disabled rather than that state has { disabled: true }
1 parent 3403072 commit 23a5b4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ReactCodeInput.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ describe('CodeInputField', () => {
168168

169169
test('should be disabled', () => {
170170
const wrapper = mount(<CodeInputField fields={4} value="123" type="number" disabled/>);
171-
expect(wrapper.state().disabled).toBe(true);
171+
expect(wrapper.find('input').every('[disabled]')).toBe(true);
172172
});
173173

174174
test('should be autoComplete off by default', () => {

0 commit comments

Comments
 (0)