diff --git a/tests/unit/specs/util/Url.spec.js b/tests/unit/specs/util/Url.spec.js index 4e0f5364..31af0d75 100644 --- a/tests/unit/specs/util/Url.spec.js +++ b/tests/unit/specs/util/Url.spec.js @@ -39,4 +39,20 @@ describe('UrlUtil', () => { const paramVal = UrlUtil.getQueryParam('foo'); expect(paramVal).to.equal(undefined); }); + + it('toQueryString returns correct query string', () => { + const params = { + foo: 'bar', + kalle: 0, + ralle: 8.88, + bully: true, + nullinger: null, + obj: { + sub1: 1 + } + }; + const queryString = UrlUtil.toQueryString(params); + console.log(queryString); + expect(queryString).to.eql('foo=bar&kalle=0&ralle=8.88&bully=true&sub1=1'); + }); });