X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/df0520719b15e7e230fb72f3e53ff36a34f4ba87..b5b75b89e923864389f814af97974a55b69a343f:/src/store/auth/auth-middleware.test.ts diff --git a/src/store/auth/auth-middleware.test.ts b/src/store/auth/auth-middleware.test.ts index bcc942e1..9ded9e67 100644 --- a/src/store/auth/auth-middleware.test.ts +++ b/src/store/auth/auth-middleware.test.ts @@ -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(); });