17019: replaced domain and cluster with fake data 17019-token-visible-within-test
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 21 Oct 2020 14:15:00 +0000 (16:15 +0200)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 21 Oct 2020 14:15:00 +0000 (16:15 +0200)
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

src/views-components/context-menu/actions/helpers.test.ts

index 23e5187a58e585d20505aabcbfd692f4f33e29fb..4234a8cc3a5ea594ef62f760a505dd5fab3255b8 100644 (file)
@@ -6,7 +6,7 @@ import { sanitizeToken, getClipboardUrl } from "./helpers";
 
 describe('helpers', () => {
     // given
-    const url = 'https://collections.ardev.roche.com/c=ardev-4zz18-k0hamvtwyit6q56/t=v2/a/b/LIMS/1.html';
+    const url = 'https://example.com/c=zzzzz/t=v2/a/b/LIMS/1.html';
 
     describe('sanitizeToken', () => {
         it('should sanitize token from the url', () => {
@@ -14,7 +14,7 @@ describe('helpers', () => {
             const result = sanitizeToken(url);
 
             // then
-            expect(result).toBe('https://collections.ardev.roche.com/c=ardev-4zz18-k0hamvtwyit6q56/LIMS/1.html?api_token=v2/a/b');
+            expect(result).toBe('https://example.com/c=zzzzz/LIMS/1.html?api_token=v2/a/b');
         });
     });
 
@@ -24,7 +24,7 @@ describe('helpers', () => {
             const result = getClipboardUrl(url);
 
             // then
-            expect(result).toBe('http://localhost?redirectTo=https://collections.ardev.roche.com/c=ardev-4zz18-k0hamvtwyit6q56/LIMS/1.html');
+            expect(result).toBe('http://localhost?redirectTo=https://example.com/c=zzzzz/LIMS/1.html');
         });
     });
 });
\ No newline at end of file