19153: Update tests
[arvados-workbench2.git] / src / common / redirect-to.test.ts
index f7f5cb38d548630f11a0d9e0adff56dc687b583f..0168fd803f327f484be2f848e805d4df503352b3 100644 (file)
@@ -8,7 +8,7 @@ describe('redirect-to', () => {
     const { location } = window;
     const config: any = {
         keepWebServiceUrl: 'http://localhost',
-        keepWebServiceInlineUrl: 'http://localhost'
+        keepWebServiceInlineUrl: 'http://localhost-inline'
     };
     const redirectTo = '/test123';
     const locationTemplate = {
@@ -36,7 +36,7 @@ describe('redirect-to', () => {
             delete window.location;
             window.location = {
                 ...locationTemplate,
-                href: `${location.href}?redirectToPreview=${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('redirectToPreview', redirectTo);
+            expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', redirectTo);
         });
     });
 
@@ -60,7 +60,7 @@ describe('redirect-to', () => {
             delete window.location;
             window.location = {
                 ...locationTemplate,
-                href: `${location.href}?redirectToPreview=${redirectTo}`,
+                href: `${location.href}?redirectToDownload=${redirectTo}`,
             } as any;;
             Object.defineProperty(window, 'localStorage', {
                 value: {