summaryrefslogtreecommitdiff
path: root/spec/javascripts/lib/utils/common_utils_spec.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-23 12:04:03 +0000
committerPhil Hughes <me@iamphill.com>2017-11-23 12:04:03 +0000
commit45631562565760add7a7c52a6137e891f3a0c8f4 (patch)
tree44915f7c46d05fb8c6197662a3341ea8fb610f06 /spec/javascripts/lib/utils/common_utils_spec.js
parent1d8ab59ebfa0d57e4015665c470c8339cd258a2c (diff)
downloadgitlab-ce-45631562565760add7a7c52a6137e891f3a0c8f4.tar.gz
Improve environments performance
Diffstat (limited to 'spec/javascripts/lib/utils/common_utils_spec.js')
-rw-r--r--spec/javascripts/lib/utils/common_utils_spec.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js
index 6dad5d6b6bd..0a9d815f469 100644
--- a/spec/javascripts/lib/utils/common_utils_spec.js
+++ b/spec/javascripts/lib/utils/common_utils_spec.js
@@ -142,47 +142,6 @@ describe('common_utils', () => {
});
});
- describe('setParamInURL', () => {
- afterEach(() => {
- window.history.pushState({}, null, '');
- });
-
- it('should return the parameter', () => {
- window.history.replaceState({}, null, '');
-
- expect(commonUtils.setParamInURL('page', 156)).toBe('?page=156');
- expect(commonUtils.setParamInURL('page', '156')).toBe('?page=156');
- });
-
- it('should update the existing parameter when its a number', () => {
- window.history.pushState({}, null, '?page=15');
-
- expect(commonUtils.setParamInURL('page', 16)).toBe('?page=16');
- expect(commonUtils.setParamInURL('page', '16')).toBe('?page=16');
- expect(commonUtils.setParamInURL('page', true)).toBe('?page=true');
- });
-
- it('should update the existing parameter when its a string', () => {
- window.history.pushState({}, null, '?scope=all');
-
- expect(commonUtils.setParamInURL('scope', 'finished')).toBe('?scope=finished');
- });
-
- it('should update the existing parameter when more than one parameter exists', () => {
- window.history.pushState({}, null, '?scope=all&page=15');
-
- expect(commonUtils.setParamInURL('scope', 'finished')).toBe('?scope=finished&page=15');
- });
-
- it('should add a new parameter to the end of the existing ones', () => {
- window.history.pushState({}, null, '?scope=all');
-
- expect(commonUtils.setParamInURL('page', 16)).toBe('?scope=all&page=16');
- expect(commonUtils.setParamInURL('page', '16')).toBe('?scope=all&page=16');
- expect(commonUtils.setParamInURL('page', true)).toBe('?scope=all&page=true');
- });
- });
-
describe('historyPushState', () => {
afterEach(() => {
window.history.replaceState({}, null, null);