From 77c99a3667bbbf09734bede8f154ef86a60d823b Mon Sep 17 00:00:00 2001 From: Daniel Kos Date: Tue, 18 Dec 2018 14:04:09 +0100 Subject: [PATCH] Fix passing auth reducer tests No issue # Arvados-DCO-1.1-Signed-off-by: Daniel Kos --- src/store/auth/auth-action.test.ts | 21 +++++++++++++++++++++ src/store/auth/auth-reducer.test.ts | 7 +++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/store/auth/auth-action.test.ts b/src/store/auth/auth-action.test.ts index d58c9159..e5775a49 100644 --- a/src/store/auth/auth-action.test.ts +++ b/src/store/auth/auth-action.test.ts @@ -56,6 +56,27 @@ describe('auth-actions', () => { expect(store.getState().auth).toEqual({ apiToken: "token", sshKeys: [], + sessions: [{ + "active": true, + "baseUrl": undefined, + "clusterId": undefined, + "email": "test@test.com", + "loggedIn": true, + "remoteHost": undefined, + "status": 2, + "token": "token", + "username": "John Doe" + }, { + "active": false, + "baseUrl": "", + "clusterId": "xc59", + "email": "", + "loggedIn": false, + "remoteHost": "xc59.api.arvados.com", + "status": 0, + "token": "", + "username": "" + }], user: { email: "test@test.com", firstName: "John", diff --git a/src/store/auth/auth-reducer.test.ts b/src/store/auth/auth-reducer.test.ts index eb7e0c0d..773f9f82 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -38,7 +38,8 @@ describe('auth-reducer', () => { expect(state).toEqual({ apiToken: "token", user, - sshKeys: [] + sshKeys: [], + sessions: [] }); }); @@ -49,7 +50,8 @@ describe('auth-reducer', () => { expect(state).toEqual({ apiToken: "token", user: undefined, - sshKeys: [] + sshKeys: [], + sessions: [] }); }); @@ -71,6 +73,7 @@ describe('auth-reducer', () => { expect(state).toEqual({ apiToken: undefined, sshKeys: [], + sessions: [], user: { email: "test@test.com", firstName: "John", -- 2.30.2