Fix passing auth reducer tests
[arvados-workbench2.git] / src / store / auth / auth-reducer.test.ts
index 3dd486b31cba402bd1adc92be9a8574837729b9d..773f9f82dbd737b2e7f0d3fa843b5be4779d6d57 100644 (file)
@@ -30,13 +30,16 @@ describe('auth-reducer', () => {
             lastName: "Doe",
             uuid: "uuid",
             ownerUuid: "ownerUuid",
-            isAdmin: true
+            identityUrl: "identityUrl",
+            prefs: {},
+            isAdmin: false
         };
         const state = reducer(initialState, authActions.INIT({ user, token: "token" }));
         expect(state).toEqual({
             apiToken: "token",
             user,
-            sshKeys: []
+            sshKeys: [],
+            sessions: []
         });
     });
 
@@ -47,7 +50,8 @@ describe('auth-reducer', () => {
         expect(state).toEqual({
             apiToken: "token",
             user: undefined,
-            sshKeys: []
+            sshKeys: [],
+            sessions: []
         });
     });
 
@@ -60,20 +64,25 @@ describe('auth-reducer', () => {
             lastName: "Doe",
             uuid: "uuid",
             ownerUuid: "ownerUuid",
-            isAdmin: true
+            identityUrl: "identityUrl",
+            prefs: {},
+            isAdmin: false
         };
 
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
         expect(state).toEqual({
             apiToken: undefined,
             sshKeys: [],
+            sessions: [],
             user: {
                 email: "test@test.com",
                 firstName: "John",
                 lastName: "Doe",
                 uuid: "uuid",
                 ownerUuid: "ownerUuid",
-                isAdmin: true
+                identityUrl: "identityUrl",
+                prefs: {},
+                isAdmin: false
             }
         });
     });