diff options
author | Anike Arni <anikarni@gmail.com> | 2017-02-08 17:45:34 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 17:45:34 -0200 |
commit | 0d4cf4ad3a5da62f65730d6c3e3665fc12d72590 (patch) | |
tree | e852ab83caeca6158ffc78e3cda100157ddb9f88 /web-ui/test/unit/common/input_field/input_field.spec.js | |
parent | a1c384cebd80e177389ef79c2de6400db986aaa6 (diff) | |
parent | ea852b12e33b0e50ba7986c33ad68be5e38305ba (diff) |
Merge pull request #965 from pixelated/backup-email-page
Adds lint, coverage and css autoprefixer
Diffstat (limited to 'web-ui/test/unit/common/input_field/input_field.spec.js')
-rw-r--r-- | web-ui/test/unit/common/input_field/input_field.spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/test/unit/common/input_field/input_field.spec.js b/web-ui/test/unit/common/input_field/input_field.spec.js new file mode 100644 index 00000000..0c044ce1 --- /dev/null +++ b/web-ui/test/unit/common/input_field/input_field.spec.js @@ -0,0 +1,20 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import InputField from 'src/common/input_field/input_field'; + +describe('InputField', () => { + let inputField; + + beforeEach(() => { + inputField = shallow(<InputField label='Email' name='email' />); + }); + + it('renders an input of type text for email', () => { + expect(inputField.find('input[type="text"]').props().name).toEqual('email'); + }); + + it('renders a label for the email', () => { + expect(inputField.find('label').text()).toEqual('Email'); + }); +}); |