15803: Updating tests WIP
[arvados.git] / src / store / auth / auth-reducer.test.ts
index f527edec21cdc69aa00d0de0c79b2b0510edc4dc..e862a313d0f3dbbeddea3e71c36dbf68247ccb07 100644 (file)
@@ -28,30 +28,24 @@ describe('auth-reducer', () => {
             email: "test@test.com",
             firstName: "John",
             lastName: "Doe",
-            uuid: "uuid",
+            uuid: "zzzzz-tpzed-xurymjxw79nv3jz",
             ownerUuid: "ownerUuid",
             username: "username",
             prefs: {},
-            isAdmin: false
+            isAdmin: false,
+            isActive: true
         };
         const state = reducer(initialState, authActions.INIT({ user, token: "token" }));
         expect(state).toEqual({
             apiToken: "token",
             user,
             sshKeys: [],
-            sessions: []
-        });
-    });
-
-    it('should save api token', () => {
-        const initialState = undefined;
-
-        const state = reducer(initialState, authActions.SAVE_API_TOKEN("token"));
-        expect(state).toEqual({
-            apiToken: "token",
-            user: undefined,
-            sshKeys: [],
-            sessions: []
+            sessions: [],
+            homeCluster: "zzzzz",
+            localCluster: "",
+            loginCluster: "",
+            remoteHosts: {},
+            remoteHostsConfig: {}
         });
     });
 
@@ -66,7 +60,8 @@ describe('auth-reducer', () => {
             ownerUuid: "ownerUuid",
             username: "username",
             prefs: {},
-            isAdmin: false
+            isAdmin: false,
+            isActive: true
         };
 
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
@@ -74,6 +69,11 @@ describe('auth-reducer', () => {
             apiToken: undefined,
             sshKeys: [],
             sessions: [],
+            homeCluster: "uuid",
+            localCluster: "",
+            loginCluster: "",
+            remoteHosts: {},
+            remoteHostsConfig: {},
             user: {
                 email: "test@test.com",
                 firstName: "John",
@@ -82,7 +82,8 @@ describe('auth-reducer', () => {
                 ownerUuid: "ownerUuid",
                 username: "username",
                 prefs: {},
-                isAdmin: false
+                isAdmin: false,
+                isActive: true
             }
         });
     });