X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2ba76201944d5ad4ef84aaf16c18f5bbb38a8b89..72ee613468c6dee53b98ed1469ce9781a942dbe9:/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 38cf1581d3..756feeeb6b 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -35,30 +35,18 @@ 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: [], homeCluster: "zzzzz", localCluster: "", - remoteHosts: {} - }); - }); - - 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: {} }); }); @@ -80,11 +68,14 @@ 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: {}, + remoteHostsConfig: {}, user: { email: "test@test.com", firstName: "John",