X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d8b1643373ec164a5ae57cd10a951ea01f37f7d7..818c47686e619fbdc3bfa11edd290d0c9e0db64b:/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 166f6d308b..e862a313d0 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -32,7 +32,8 @@ describe('auth-reducer', () => { ownerUuid: "ownerUuid", username: "username", prefs: {}, - isAdmin: false + isAdmin: false, + isActive: true }; const state = reducer(initialState, authActions.INIT({ user, token: "token" })); expect(state).toEqual({ @@ -42,22 +43,9 @@ describe('auth-reducer', () => { 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: {} }); }); @@ -72,7 +60,8 @@ describe('auth-reducer', () => { ownerUuid: "ownerUuid", username: "username", prefs: {}, - isAdmin: false + isAdmin: false, + isActive: true }; const state = reducer(initialState, authActions.USER_DETAILS_SUCCESS(user)); @@ -80,9 +69,11 @@ describe('auth-reducer', () => { apiToken: undefined, sshKeys: [], sessions: [], - homeCluster: "", + homeCluster: "uuid", localCluster: "", + loginCluster: "", remoteHosts: {}, + remoteHostsConfig: {}, user: { email: "test@test.com", firstName: "John", @@ -91,7 +82,8 @@ describe('auth-reducer', () => { ownerUuid: "ownerUuid", username: "username", prefs: {}, - isAdmin: false + isAdmin: false, + isActive: true } }); });