diff options
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r-- | spec/frontend/ide/lib/files_spec.js | 3 | ||||
-rw-r--r-- | spec/frontend/ide/stores/mutations_spec.js | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/spec/frontend/ide/lib/files_spec.js b/spec/frontend/ide/lib/files_spec.js index 34eb57ae0d3..2b15aef6454 100644 --- a/spec/frontend/ide/lib/files_spec.js +++ b/spec/frontend/ide/lib/files_spec.js @@ -1,7 +1,6 @@ import { viewerInformationForPath } from '~/vue_shared/components/content_viewer/lib/viewer_utils'; import { decorateFiles, splitParent } from '~/ide/lib/files'; import { decorateData } from '~/ide/stores/utils'; -import { escapeFileUrl } from '~/lib/utils/url_utility'; const TEST_BRANCH_ID = 'lorem-ipsum'; const TEST_PROJECT_ID = 10; @@ -22,7 +21,7 @@ const createEntries = paths => { id: path, name, path, - url: createUrl(`/${TEST_PROJECT_ID}/${type}/${TEST_BRANCH_ID}/-/${escapeFileUrl(path)}`), + url: createUrl(`/${TEST_PROJECT_ID}/${type}/${TEST_BRANCH_ID}/-/${path}`), type, previewMode, binary: (previewMode && previewMode.binary) || false, diff --git a/spec/frontend/ide/stores/mutations_spec.js b/spec/frontend/ide/stores/mutations_spec.js index 9fe75d596fb..d9ce59ad378 100644 --- a/spec/frontend/ide/stores/mutations_spec.js +++ b/spec/frontend/ide/stores/mutations_spec.js @@ -494,7 +494,7 @@ describe('Multi-file store mutations', () => { it('properly handles files with spaces in name', () => { const path = 'my fancy path'; const newPath = 'new path'; - const oldEntry = { ...file(path, path, 'blob'), url: `project/-/${encodeURI(path)}` }; + const oldEntry = { ...file(path, path, 'blob'), url: `project/-/${path}` }; localState.entries[path] = oldEntry; @@ -510,12 +510,12 @@ describe('Multi-file store mutations', () => { id: newPath, path: newPath, name: newPath, - url: `project/-/new%20path`, + url: `project/-/new path`, key: expect.stringMatching(newPath), prevId: path, prevName: path, prevPath: path, - prevUrl: `project/-/my%20fancy%20path`, + prevUrl: `project/-/my fancy path`, prevKey: oldEntry.key, prevParentPath: oldEntry.parentPath, }); |