summaryrefslogtreecommitdiff
path: root/web-ui/src/common/input_field/input_field.spec.js
diff options
context:
space:
mode:
authorTulio Casagrande <tuliocasagrande@gmail.com>2017-02-24 15:53:06 -0300
committerGitHub <noreply@github.com>2017-02-24 15:53:06 -0300
commitf783cbba382433c122e19a7231ebe17cc1ae7e5b (patch)
tree0f29f48029cdbc6bb53aa80ea6fa8862732b7459 /web-ui/src/common/input_field/input_field.spec.js
parentd77d9c41e5a5b791cf54082f0f1ae83699f0bc95 (diff)
parentef173d95b22154ee72c685cd6d5b04e9473dc988 (diff)
Merge pull request #993 from pixelated/login-errors
Login errors - some refactorings
Diffstat (limited to 'web-ui/src/common/input_field/input_field.spec.js')
-rw-r--r--web-ui/src/common/input_field/input_field.spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/src/common/input_field/input_field.spec.js b/web-ui/src/common/input_field/input_field.spec.js
new file mode 100644
index 00000000..0c044ce1
--- /dev/null
+++ b/web-ui/src/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');
+ });
+});