18881: Fixes the "non-status" indication on objects that aren't processes.
[arvados-workbench2.git] / src / store / auth / auth-reducer.test.ts
index e862a313d0f3dbbeddea3e71c36dbf68247ccb07..6a1fb87faa8c10d8fc30a47bc3005c3ead1a3df0 100644 (file)
@@ -6,9 +6,9 @@ import { authReducer, AuthState } from "./auth-reducer";
 import { AuthAction, authActions } from "./auth-action";
 
 import 'jest-localstorage-mock';
-import { createServices } from "~/services/services";
-import { mockConfig } from '~/common/config';
-import { ApiActions } from "~/services/api/api-actions";
+import { createServices } from "services/services";
+import { mockConfig } from 'common/config';
+import { ApiActions } from "services/api/api-actions";
 
 describe('auth-reducer', () => {
     let reducer: (state: AuthState | undefined, action: AuthAction) => any;
@@ -35,9 +35,10 @@ describe('auth-reducer', () => {
             isAdmin: false,
             isActive: true
         };
-        const state = reducer(initialState, authActions.INIT({ user, token: "token" }));
+        const state = reducer(initialState, authActions.INIT_USER({ user, token: "token" }));
         expect(state).toEqual({
             apiToken: "token",
+            config: mockConfig({}),
             user,
             sshKeys: [],
             sessions: [],
@@ -67,6 +68,7 @@ describe('auth-reducer', () => {
         const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user));
         expect(state).toEqual({
             apiToken: undefined,
+            config: mockConfig({}),
             sshKeys: [],
             sessions: [],
             homeCluster: "uuid",