From ef1033dffc1ed32f369f25b9abb53a30d4952312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Dub=C3=A9?= Date: Tue, 21 Mar 2017 09:19:07 -0400 Subject: [PATCH] Test for ol.format.WFS.writerFilter method --- test/spec/ol/format/wfs.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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)); + }); + }); + });