diff --git a/test/spec/ol/uri.test.js b/test/spec/ol/uri.test.js index 97ff5976d6..374d21ddaf 100644 --- a/test/spec/ol/uri.test.js +++ b/test/spec/ol/uri.test.js @@ -62,4 +62,13 @@ describe('ol.uri.appendParams()', function() { expect(url).to.equal('http://example.com/foo?bar=bam&baz=bat&bop=&k=v'); }); + it('should not append null or undefined parameters to the url', function() { + var url = ol.uri.appendParams('http://example.com/foo', { + a: '1', + b: null, + c: undefined + }); + expect(url).to.equal('http://example.com/foo?a=1'); + }); + });