21704: fixed auth-reducer test
[arvados.git] / services / workbench2 / src / store / auth / auth-reducer.test.ts
index 6a1fb87faa8c10d8fc30a47bc3005c3ead1a3df0..0d83e390ed986cf2c1b1e695729e28995511595f 100644 (file)
@@ -33,7 +33,9 @@ describe('auth-reducer', () => {
             username: "username",
             prefs: {},
             isAdmin: false,
-            isActive: true
+            isActive: true,
+            canWrite: false,
+            canManage: false,
         };
         const state = reducer(initialState, authActions.INIT_USER({ user, token: "token" }));
         expect(state).toEqual({
@@ -62,15 +64,21 @@ describe('auth-reducer', () => {
             username: "username",
             prefs: {},
             isAdmin: false,
-            isActive: true
+            isActive: true,
+            canWrite: false,
+            canManage: false,
         };
 
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
         expect(state).toEqual({
             apiToken: undefined,
+            apiTokenExpiration: undefined,
+            apiTokenLocation: undefined,
             config: mockConfig({}),
             sshKeys: [],
             sessions: [],
+            extraApiToken: undefined,
+            extraApiTokenExpiration: undefined,
             homeCluster: "uuid",
             localCluster: "",
             loginCluster: "",
@@ -85,7 +93,9 @@ describe('auth-reducer', () => {
                 username: "username",
                 prefs: {},
                 isAdmin: false,
-                isActive: true
+                isActive: true,
+                canManage: false,
+                canWrite: false,
             }
         });
     });