summaryrefslogtreecommitdiff
path: root/web-ui/test/unit/common/input_field
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/unit/common/input_field')
-rw-r--r--web-ui/test/unit/common/input_field/input_field.spec.js20
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');
+ });
+});