15530: Fix tests
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Thu, 24 Oct 2019 14:29:16 +0000 (10:29 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Thu, 24 Oct 2019 14:29:16 +0000 (10:29 -0400)
src/store/auth/auth-action.test.ts
src/store/auth/auth-reducer.test.ts

index 1ebc8db993be3fc3d82125f24a59ac54dce8bba4..801d9e33ee9cb9d3e8a266298712fc7bdfe1b956 100644 (file)
@@ -23,7 +23,7 @@ import { configureStore, RootStore } from "../store";
 import createBrowserHistory from "history/createBrowserHistory";
 import { mockConfig } from '~/common/config';
 import { ApiActions } from "~/services/api/api-actions";
-import { ACCOUNT_LINK_STATUS_KEY} from '~/services/link-account-service/link-account-service';
+import { ACCOUNT_LINK_STATUS_KEY } from '~/services/link-account-service/link-account-service';
 
 describe('auth-actions', () => {
     let reducer: (state: AuthState | undefined, action: AuthAction) => any;
@@ -67,7 +67,16 @@ describe('auth-actions', () => {
             sshKeys: [],
             homeCluster: "zzzzz",
             localCluster: "zzzzz",
-            remoteHostsConfig: {},
+            loginCluster: undefined,
+            remoteHostsConfig: {
+                "zzzzz": {
+                    "remoteHosts": {
+                        "xc59z": "xc59z.arvadosapi.com",
+                    },
+                    "rootUrl": "https://zzzzz.arvadosapi.com",
+                    "uuidPrefix": "zzzzz",
+                },
+            },
             remoteHosts: {
                 zzzzz: "zzzzz.arvadosapi.com",
                 xc59z: "xc59z.arvadosapi.com"
@@ -89,7 +98,7 @@ describe('auth-actions', () => {
                 "email": "",
                 "loggedIn": false,
                 "remoteHost": "xc59z.arvadosapi.com",
-                "status": 0,
+                "status": 1,
                 "token": "",
                 "username": ""
             }],
index 14d92803cc1fc21750d662d723ded60c2d3221ad..8311e861ed67e647879a5f2ebf1b09b98a305b13 100644 (file)
@@ -43,6 +43,7 @@ describe('auth-reducer', () => {
             sessions: [],
             homeCluster: "zzzzz",
             localCluster: "",
+            loginCluster: "",
             remoteHosts: {},
             remoteHostsConfig: {}
         });
@@ -59,6 +60,7 @@ describe('auth-reducer', () => {
             sessions: [],
             homeCluster: "",
             localCluster: "",
+            loginCluster: "",
             remoteHosts: {},
             remoteHostsConfig: {}
         });
@@ -86,6 +88,7 @@ describe('auth-reducer', () => {
             sessions: [],
             homeCluster: "",
             localCluster: "",
+            loginCluster: "",
             remoteHosts: {},
             remoteHostsConfig: {},
             user: {