Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/repository/components/breadcrumbs_spec.js')
-rw-r--r--spec/frontend/repository/components/breadcrumbs_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/repository/components/breadcrumbs_spec.js b/spec/frontend/repository/components/breadcrumbs_spec.js
index 0e300291d05..0e3e7075e99 100644
--- a/spec/frontend/repository/components/breadcrumbs_spec.js
+++ b/spec/frontend/repository/components/breadcrumbs_spec.js
@@ -59,6 +59,20 @@ describe('Repository breadcrumbs component', () => {
expect(wrapper.findAll(RouterLinkStub).length).toEqual(linkCount);
});
+ it.each`
+ routeName | path | linkTo
+ ${'treePath'} | ${'app/assets/javascripts'} | ${'/-/tree/app/assets/javascripts'}
+ ${'treePathDecoded'} | ${'app/assets/javascripts'} | ${'/-/tree/app/assets/javascripts'}
+ ${'blobPath'} | ${'app/assets/index.js'} | ${'/-/blob/app/assets/index.js'}
+ ${'blobPathDecoded'} | ${'app/assets/index.js'} | ${'/-/blob/app/assets/index.js'}
+ `(
+ 'links to the correct router path when routeName is $routeName',
+ ({ routeName, path, linkTo }) => {
+ factory(path, {}, { name: routeName });
+ expect(wrapper.findAll(RouterLinkStub).at(3).props('to')).toEqual(linkTo);
+ },
+ );
+
it('escapes hash in directory path', () => {
factory('app/assets/javascripts#');