summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-01-13 12:51:19 -0500
committerMike Greiling <mike@pixelcog.com>2017-01-13 13:03:17 -0500
commit6ad01a49d478460905da4596ad22061fa85d6873 (patch)
tree6ef0b357acf1f8391fa67883b2c184df5eb0fab3 /spec/javascripts
parent2ee2daa4b91f255218d6f68befa8395d2c62bb3a (diff)
downloadgitlab-ce-6ad01a49d478460905da4596ad22061fa85d6873.tar.gz
rewrite test which relied on teaspoon quirk
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/lib/utils/common_utils_spec.js.es68
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js.es6 b/spec/javascripts/lib/utils/common_utils_spec.js.es6
index bd9c82121a6..9e8456c03aa 100644
--- a/spec/javascripts/lib/utils/common_utils_spec.js.es6
+++ b/spec/javascripts/lib/utils/common_utils_spec.js.es6
@@ -42,9 +42,13 @@ require('~/lib/utils/common_utils');
});
describe('gl.utils.getParameterByName', () => {
+ beforeEach(() => {
+ window.history.pushState({}, null, '?scope=all&p=2');
+ });
+
it('should return valid parameter', () => {
- const value = gl.utils.getParameterByName('reporter');
- expect(value).toBe('Console');
+ const value = gl.utils.getParameterByName('scope');
+ expect(value).toBe('all');
});
it('should return invalid parameter', () => {