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