diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 15:08:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 15:08:56 +0000 |
commit | 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (patch) | |
tree | 8eb149293eee90ec2750b6ac5e46a111a806424e /spec/frontend/repository | |
parent | 66d4203791a01fdedf668a78818a229ea2c07aad (diff) | |
download | gitlab-ce-17ab40ca089e1aef61a83f77ab6df62a72f6ce06.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r-- | spec/frontend/repository/components/breadcrumbs_spec.js | 2 | ||||
-rw-r--r-- | spec/frontend/repository/components/table/row_spec.js | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/frontend/repository/components/breadcrumbs_spec.js b/spec/frontend/repository/components/breadcrumbs_spec.js index 0271db25468..38e5c9aaca5 100644 --- a/spec/frontend/repository/components/breadcrumbs_spec.js +++ b/spec/frontend/repository/components/breadcrumbs_spec.js @@ -41,7 +41,7 @@ describe('Repository breadcrumbs component', () => { .findAll(RouterLinkStub) .at(3) .props('to'), - ).toEqual('/-/tree//app/assets/javascripts%23'); + ).toEqual('/-/tree/app/assets/javascripts%23'); }); it('renders last link as active', () => { diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index fec9ba3aa2e..a51846023ac 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -109,6 +109,26 @@ describe('Repository table row component', () => { }); }); + it.each` + path + ${'test#'} + ${'Ă„nderungen'} + `('renders link for $path', ({ path }) => { + factory({ + id: '1', + sha: '123', + path, + type: 'tree', + currentPath: '/', + }); + + return vm.vm.$nextTick().then(() => { + expect(vm.find({ ref: 'link' }).props('to')).toEqual({ + path: `/-/tree/master/${encodeURIComponent(path)}`, + }); + }); + }); + it('pushes new route for directory with hash', () => { factory({ id: '1', |