17337: Fixed encode uri
[arvados-workbench2.git] / src / services / collection-service / collection-service-files-response.test.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { CollectionFile } from '~/models/collection-file';
6 import { getFileFullPath } from './collection-service-files-response';
7
8 describe('collection-service-files-response', () => {
9     describe('getFileFullPath', () => {
10         it('should encode weird names', async () => {
11             // given
12             const file = { 
13                 name: '#test',
14                 path: 'http://localhost',
15              } as CollectionFile;
16
17             // when
18             const result = getFileFullPath(file);
19
20             // then
21             expect(result).toBe('http://localhost/#test');
22         });
23
24     });
25 });