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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 21:06:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 21:06:20 +0300
commit2abb1b54c0305b359b178d6660810e865f619c22 (patch)
treee388953a0566ef9844b0b98cdb34236049721a14 /spec/javascripts/lib/utils/common_utils_spec.js
parent8320f7956d72986f5a7c850874fce4f8b5a8e015 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/lib/utils/common_utils_spec.js')
-rw-r--r--spec/javascripts/lib/utils/common_utils_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js
index 85949f2ae86..8956bc92e6b 100644
--- a/spec/javascripts/lib/utils/common_utils_spec.js
+++ b/spec/javascripts/lib/utils/common_utils_spec.js
@@ -943,4 +943,14 @@ describe('common_utils', () => {
expect(commonUtils.isScopedLabel({ title: 'foobar' })).toBe(false);
});
});
+
+ describe('getDashPath', () => {
+ it('returns the path following /-/', () => {
+ expect(commonUtils.getDashPath('/some/-/url-with-dashes-/')).toEqual('url-with-dashes-/');
+ });
+
+ it('returns null when no path follows /-/', () => {
+ expect(commonUtils.getDashPath('/some/url')).toEqual(null);
+ });
+ });
});