Commit 8fd37a0c authored by Justin Ho's avatar Justin Ho

Add spec for setUrlParams with railsArraySyntax

parent 0a38a9b6
......@@ -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';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment