X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c15afcee286bb8ab694f488e2ccd490b56794e47..3def82c401e28a430b222bee86ede13158165976:/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 1438cab3..5a0364eb 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; @@ -36,10 +36,10 @@ describe("AuthMiddleware", () => { window.location.assign = jest.fn(); const next = jest.fn(); const middleware = authMiddleware(services)(store)(next); - middleware(authActions.LOGOUT({deleteLinkData: false})); + middleware(authActions.LOGOUT({deleteLinkData: false, preservePath: false})); expect(window.location.assign).toBeCalledWith( `/logout?api_token=someToken&return_to=${location.protocol}//${location.host}` ); expect(localStorage.getItem(API_TOKEN_KEY)).toBeFalsy(); }); -}); \ No newline at end of file +});