15718: Adds API revision number from discovery doc to sessions.
[arvados-workbench2.git] / src / store / auth / auth-action.test.ts
index d126d9caeb52f519e2b643be84384311765cfa5e..8a17fe9f42da87b0360845580d2ce4e8fcdabb6f 100644 (file)
@@ -67,6 +67,7 @@ describe('auth-actions', () => {
             rootUrl: "https://zzzzz.arvadosapi.com",
             uuidPrefix: "zzzzz",
             remoteHosts: { xc59z: "xc59z.arvadosapi.com" },
+            apiRevision: 12345678,
         };
 
         store.dispatch(initAuth(config));
@@ -82,6 +83,7 @@ describe('auth-actions', () => {
                     expect(auth).toEqual({
                         apiToken: "token",
                         config: {
+                            apiRevision: 12345678,
                             remoteHosts: {
                                 "xc59z": "xc59z.arvadosapi.com",
                             },
@@ -94,6 +96,7 @@ describe('auth-actions', () => {
                         loginCluster: undefined,
                         remoteHostsConfig: {
                             "zzzzz": {
+                                "apiRevision": 12345678,
                                 "remoteHosts": {
                                     "xc59z": "xc59z.arvadosapi.com",
                                 },
@@ -114,8 +117,9 @@ describe('auth-actions', () => {
                             "remoteHost": "https://zzzzz.arvadosapi.com",
                             "status": 2,
                             "token": "token",
-                            "name": "John Doe"
-                   "uuid": "zzzzz-tpzed-abcefg",
+                            "name": "John Doe",
+                            "apiRevision": 12345678,
+                            "uuid": "zzzzz-tpzed-abcefg",
                         }, {
                             "active": false,
                             "baseUrl": "",
@@ -127,6 +131,7 @@ describe('auth-actions', () => {
                             "token": "",
                             "name": "",
                             "uuid": "",
+                            "apiRevision": 0,
                         }],
                         user: {
                             email: "test@test.com",