X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a9f2ce9838cf6a215cbc108073d033bc3811bdf5..HEAD:/src/common/redirect-to.test.ts diff --git a/src/common/redirect-to.test.ts b/src/common/redirect-to.test.ts index e25d7be9..adb52f4b 100644 --- a/src/common/redirect-to.test.ts +++ b/src/common/redirect-to.test.ts @@ -8,9 +8,9 @@ describe('redirect-to', () => { const { location } = window; const config: any = { keepWebServiceUrl: 'http://localhost', - keepWebServiceInlineUrl: 'http://localhost' + keepWebServiceInlineUrl: 'http://localhost-inline' }; - const redirectTo = '/test123'; + const redirectTo = 'c=acbd18db4cc2f85cedef654fccc4a4d8%2B3/foo'; const locationTemplate = { hash: '', hostname: '', @@ -36,7 +36,7 @@ describe('redirect-to', () => { delete window.location; window.location = { ...locationTemplate, - href: `${location.href}?redirectTo=${redirectTo}`, + href: `${location.href}?redirectToDownload=${redirectTo}`, } as any; Object.defineProperty(window, 'localStorage', { value: { @@ -51,7 +51,7 @@ describe('redirect-to', () => { storeRedirects(); // then - expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectTo', redirectTo); + expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', decodeURIComponent(redirectTo)); }); }); @@ -60,7 +60,7 @@ describe('redirect-to', () => { delete window.location; window.location = { ...locationTemplate, - href: `${location.href}?redirectTo=${redirectTo}`, + href: `${location.href}?redirectToDownload=${redirectTo}`, } as any;; Object.defineProperty(window, 'localStorage', { value: {