Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
9e8762f8
Commit
9e8762f8
authored
Feb 02, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework tests which rely on teaspoon-specific behavior
parent
f38b7cee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
spec/javascripts/lib/utils/common_utils_spec.js.es6
spec/javascripts/lib/utils/common_utils_spec.js.es6
+9
-5
No files found.
spec/javascripts/lib/utils/common_utils_spec.js.es6
View file @
9e8762f8
...
...
@@ -10,9 +10,9 @@
// IE11 will return a relative pathname while other browsers will return a full pathname.
// parseUrl uses an anchor element for parsing an url. With relative urls, the anchor
// element will create an absolute url relative to the current execution context.
// The JavaScript test suite is executed at '/
teaspoon' which will lead to an absolute
//
url starting with '/teaspoon
'.
expect(gl.utils.parseUrl('" test="asf"').pathname).to
Equal('/teaspoon
/%22%20test=%22asf%22');
// The JavaScript test suite is executed at '/
' which will lead to an absolute url
//
starting with '/
'.
expect(gl.utils.parseUrl('" test="asf"').pathname).to
Contain('
/%22%20test=%22asf%22');
});
});
...
...
@@ -42,9 +42,13 @@
});
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', () => {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment