Merge branch 'master' into 14452-my-account
[arvados-workbench2.git] / src / store / auth / auth-reducer.test.ts
index 1202bacb125b5e1afc61908cb64f9953946b41f6..b9f768f1cb0a42a9653d119cc577e516b21407ba 100644 (file)
@@ -29,12 +29,16 @@ describe('auth-reducer', () => {
             firstName: "John",
             lastName: "Doe",
             uuid: "uuid",
-            ownerUuid: "ownerUuid"
+            ownerUuid: "ownerUuid",
+            identityUrl: "identityUrl",
+            prefs: {},
+            isAdmin: false
         };
         const state = reducer(initialState, authActions.INIT({ user, token: "token" }));
         expect(state).toEqual({
             apiToken: "token",
-            user
+            user,
+            sshKeys: []
         });
     });
 
@@ -44,7 +48,8 @@ describe('auth-reducer', () => {
         const state = reducer(initialState, authActions.SAVE_API_TOKEN("token"));
         expect(state).toEqual({
             apiToken: "token",
-            user: undefined
+            user: undefined,
+            sshKeys: []
         });
     });
 
@@ -56,18 +61,23 @@ describe('auth-reducer', () => {
             firstName: "John",
             lastName: "Doe",
             uuid: "uuid",
-            ownerUuid: "ownerUuid"
+            ownerUuid: "ownerUuid",
+            identityUrl: "identityUrl",
+            prefs: {},
+            isAdmin: false
         };
 
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
         expect(state).toEqual({
             apiToken: undefined,
+            sshKeys: [],
             user: {
                 email: "test@test.com",
                 firstName: "John",
                 lastName: "Doe",
                 uuid: "uuid",
                 ownerUuid: "ownerUuid",
+                isAdmin: false
             }
         });
     });