18123: Clarify variable names
[arvados-workbench2.git] / src / store / auth / auth-middleware.test.ts
index bcc942e1ee76e85f338ed34bc2db80437715d1ef..9ded9e674ec02ddb8a0202e64d84276e4a6980da 100644 (file)
@@ -8,11 +8,11 @@ import { createBrowserHistory } from "history";
 
 import { authMiddleware } from "./auth-middleware";
 import { RootStore, configureStore } from "../store";
-import { ServiceRepository, createServices } from "~/services/services";
-import { ApiActions } from "~/services/api/api-actions";
-import { mockConfig } from "~/common/config";
+import { ServiceRepository, createServices } from "services/services";
+import { ApiActions } from "services/api/api-actions";
+import { mockConfig } from "common/config";
 import { authActions } from "./auth-action";
-import { API_TOKEN_KEY } from '~/services/auth-service/auth-service';
+import { API_TOKEN_KEY } from 'services/auth-service/auth-service';
 
 describe("AuthMiddleware", () => {
     let store: RootStore;
@@ -38,7 +38,7 @@ describe("AuthMiddleware", () => {
         const middleware = authMiddleware(services)(store)(next);
         middleware(authActions.LOGOUT({deleteLinkData: false}));
         expect(window.location.assign).toBeCalledWith(
-            `/logout?return_to=${location.protocol}//${location.host}`
+            `/logout?api_token=someToken&return_to=${location.protocol}//${location.host}`
         );
         expect(localStorage.getItem(API_TOKEN_KEY)).toBeFalsy();
     });