diff --git a/test/spec/ol/format/wfs.test.js b/test/spec/ol/format/wfs.test.js index bb65e998fd..843a2b1c5a 100644 --- a/test/spec/ol/format/wfs.test.js +++ b/test/spec/ol/format/wfs.test.js @@ -1014,4 +1014,29 @@ describe('ol.format.WFS', function() { }); + describe('when writing out a WFS Filter', function() { + it('creates a filter', function() { + var text = + '' + + ' ' + + ' ' + + ' name' + + ' Mississippi*' + + ' ' + + ' ' + + ' waterway' + + ' riverbank' + + ' ' + + ' ' + + ''; + var serialized = ol.format.WFS.writeFilter( + ol.format.filter.and( + ol.format.filter.like('name', 'Mississippi*'), + ol.format.filter.equalTo('waterway', 'riverbank') + ) + ); + expect(serialized).to.xmleql(ol.xml.parse(text)); + }); + }); + });