X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e5551bf01ddaff04ca0494013b7bab1a0978f7d1..fb3f4deaceade35ad36718ce814d6ff4d0cb996b:/src/store/auth/auth-reducer.test.ts diff --git a/src/store/auth/auth-reducer.test.ts b/src/store/auth/auth-reducer.test.ts index 8311e861..756feeeb 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -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: [], @@ -49,23 +50,6 @@ describe('auth-reducer', () => { }); }); - 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: [], - homeCluster: "", - localCluster: "", - loginCluster: "", - remoteHosts: {}, - remoteHostsConfig: {} - }); - }); - it('should set user details on success fetch', () => { const initialState = undefined; @@ -84,9 +68,10 @@ describe('auth-reducer', () => { const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user)); expect(state).toEqual({ apiToken: undefined, + config: mockConfig({}), sshKeys: [], sessions: [], - homeCluster: "", + homeCluster: "uuid", localCluster: "", loginCluster: "", remoteHosts: {},