20688: Update test for uri encoding/decoding of PDH 20688-redirect-urldecode
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 31 Jul 2023 20:00:45 +0000 (16:00 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 31 Jul 2023 20:00:45 +0000 (16:00 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

src/common/redirect-to.test.ts

index 0168fd803f327f484be2f848e805d4df503352b3..adb52f4b0ce494167170c02390433a4ba82dec9f 100644 (file)
@@ -10,7 +10,7 @@ describe('redirect-to', () => {
         keepWebServiceUrl: 'http://localhost',
         keepWebServiceInlineUrl: 'http://localhost-inline'
     };
-    const redirectTo = '/test123';
+    const redirectTo = 'c=acbd18db4cc2f85cedef654fccc4a4d8%2B3/foo';
     const locationTemplate = {
         hash: '',
         hostname: '',
@@ -51,7 +51,7 @@ describe('redirect-to', () => {
             storeRedirects();
 
             // then
-            expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', redirectTo);
+            expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', decodeURIComponent(redirectTo));
         });
     });