client/src/selectors/__tests__/authSelectors.test.js
changeset 170 7da1d5137b0b
parent 168 ea92f4fe783d
--- a/client/src/selectors/__tests__/authSelectors.test.js	Thu Oct 11 11:05:04 2018 +0200
+++ b/client/src/selectors/__tests__/authSelectors.test.js	Tue Nov 06 16:19:26 2018 +0100
@@ -8,7 +8,8 @@
   getCreateGroup,
   getAutoSubmit,
   getGroups,
-  getCurrentGroup
+  getCurrentGroup,
+  getLoginErrorMessages
 } from '../authSelectors';
 
 import asyncRequest from '../../constants/asyncRequest';
@@ -240,7 +241,7 @@
   })
 
 
-  test('getCurrentGroupUndefined', ()  => {
+  test('getCurrentGroupUndefined', () => {
     const inputState = {
       status: {
         isSynchronizing: false,
@@ -263,5 +264,33 @@
     expect(getCurrentGroup(inputState)).toEqual(undefined);
   })
 
+  test('getLoginErrorMessages', () => {
+    const inputState = {
+      login: {
+        loading: false,
+        success: false,
+        error: false,
+        errorMessages: {}
+      }
+    }
+
+    expect(getLoginErrorMessages(inputState)).toEqual({});
+  })
+
+  test('getLoginErrorMessagesUndefined', () => {
+    const inputState = {
+    }
+
+    expect(getLoginErrorMessages(inputState)).toEqual(undefined);
+  })
+
+  test('getLoginErrorMessagesUndefinedPath', () => {
+    const inputState = {
+      login: {
+      }
+    }
+    expect(getLoginErrorMessages(inputState)).toEqual(undefined);
+  })
+
 
 })