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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8fd37a0c
Commit
8fd37a0c
authored
Jul 15, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for setUrlParams with railsArraySyntax
parent
0a38a9b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
spec/frontend/lib/utils/url_utility_spec.js
spec/frontend/lib/utils/url_utility_spec.js
+8
-0
No files found.
spec/frontend/lib/utils/url_utility_spec.js
View file @
8fd37a0c
...
...
@@ -595,6 +595,14 @@ describe('URL utility', () => {
);
});
it
(
'
handles arrays properly when railsArraySyntax=true
'
,
()
=>
{
const
url
=
'
https://gitlab.com/test
'
;
expect
(
urlUtils
.
setUrlParams
({
labels
:
[
'
foo
'
,
'
bar
'
]
},
url
,
false
,
true
)).
toEqual
(
'
https://gitlab.com/test?labels%5B%5D=foo&labels%5B%5D=bar
'
,
);
});
it
(
'
removes all existing URL params and sets a new param when cleanParams=true
'
,
()
=>
{
const
url
=
'
https://gitlab.com/test?group_id=gitlab-org&project_id=my-project
'
;
...
...
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