diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-20 14:37:37 -0300 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-21 13:32:05 -0300 |
commit | fa21608801f8d2ef710d4c28abbb558883afeaf7 (patch) | |
tree | 009db4bb064b077a231a1abe4de212bceb20928b /web-ui/test/unit/login | |
parent | bfd85dff6b086abae1c16014e318c89cba929b66 (diff) |
[#907] Translate auth error message on login
with @anikarni
Diffstat (limited to 'web-ui/test/unit/login')
-rw-r--r-- | web-ui/test/unit/login/app.spec.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/web-ui/test/unit/login/app.spec.js b/web-ui/test/unit/login/app.spec.js index 3b6461cf..347e2b19 100644 --- a/web-ui/test/unit/login/app.spec.js +++ b/web-ui/test/unit/login/app.spec.js @@ -5,13 +5,22 @@ import { App } from 'src/login/app'; describe('App', () => { let app; + const mockTranslations = key => key; beforeEach(() => { - const mockTranslations = key => key; app = shallow(<App t={mockTranslations} />); }); it('renders login form', () => { expect(app.find('form').props().action).toEqual('/login'); }); + + it('renders auth error message', () => { + app = shallow(<App t={mockTranslations} authError />); + expect(app.find('.error').length).toEqual(1); + }); + + it('does not render auth error message', () => { + expect(app.find('.error').length).toEqual(0); + }); }); |