Merge remote-tracking branch 'origin/main' into 19051-handle-quotes-in-search
[arvados-workbench2.git] / src / views-components / context-menu / actions / helpers.test.ts
index b2cb4a5500f06a54d19312832aa48d72f46ae155..7776d0e5aacdf976fe081ef9cbb964dd44e04b31 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { sanitizeToken, getClipboardUrl, getInlineFileUrl } from "./helpers";
+import { sanitizeToken, getCollectionItemClipboardUrl, getInlineFileUrl } from "./helpers";
 
 describe('helpers', () => {
     // given
@@ -22,10 +22,10 @@ describe('helpers', () => {
     describe('getClipboardUrl', () => {
         it('should add redirectTo query param', () => {
             // when
-            const result = getClipboardUrl(url);
+            const result = getCollectionItemClipboardUrl(url);
 
             // then
-            expect(result).toBe('http://localhost?redirectTo=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html');
+            expect(result).toBe('http://localhost?redirectToDownload=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html');
         });
     });
 
@@ -67,4 +67,4 @@ describe('helpers', () => {
             expect(result).toBe('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html');
         });
     });
-});
\ No newline at end of file
+});