diff options
author | Anike Arni <anikarni@gmail.com> | 2017-02-23 11:21:39 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 11:21:39 -0300 |
commit | b06face47a2e19cc1afcda3f0e298d19f7dcb6bb (patch) | |
tree | 1e28b3200f329f4ddbe85c399e26b05d192ea354 /web-ui/test/unit/login/error | |
parent | 92c6a9dbc39318df48b4b3d5fae1a3888f201343 (diff) | |
parent | 55cae8e71afec52e31401c512b8bebbb1e5ca88d (diff) |
Merge pull request #987 from pixelated/login-errors
Adds welcome and error messages to login
Diffstat (limited to 'web-ui/test/unit/login/error')
-rw-r--r-- | web-ui/test/unit/login/error/auth_error.spec.js | 17 | ||||
-rw-r--r-- | web-ui/test/unit/login/error/generic_error.spec.js | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/web-ui/test/unit/login/error/auth_error.spec.js b/web-ui/test/unit/login/error/auth_error.spec.js new file mode 100644 index 00000000..55d8920f --- /dev/null +++ b/web-ui/test/unit/login/error/auth_error.spec.js @@ -0,0 +1,17 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { AuthError } from 'src/login/error/auth_error'; + +describe('AuthError', () => { + let authError; + const mockTranslations = key => key; + + beforeEach(() => { + authError = shallow(<AuthError t={mockTranslations} />); + }); + + it('renders error message', () => { + expect(authError.find('.auth-error').length).toEqual(1); + }); +}); diff --git a/web-ui/test/unit/login/error/generic_error.spec.js b/web-ui/test/unit/login/error/generic_error.spec.js new file mode 100644 index 00000000..1ef8349d --- /dev/null +++ b/web-ui/test/unit/login/error/generic_error.spec.js @@ -0,0 +1,17 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { GenericError } from 'src/login/error/generic_error'; + +describe('GenericError', () => { + let genericError; + const mockTranslations = key => key; + + beforeEach(() => { + genericError = shallow(<GenericError t={mockTranslations} />); + }); + + it('renders error message', () => { + expect(genericError.find('.generic-error').length).toEqual(1); + }); +}); |