Port over test case for multiple Query elements
This commit is contained in:
4
test/spec/ol/format/wfs/GetFeatureMultiple.xml
Normal file
4
test/spec/ol/format/wfs/GetFeatureMultiple.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<wfs:Query typeName="topp:states" xmlns:topp="http://www.openplans.org/topp"/>
|
||||
<wfs:Query typeName="topp:cities" xmlns:topp="http://www.openplans.org/topp"/>
|
||||
</wfs:GetFeature>
|
||||
@@ -259,6 +259,27 @@ describe('ol.format.WFS', function() {
|
||||
expect(serialized).to.xmleql(ol.xml.load(text));
|
||||
});
|
||||
});
|
||||
|
||||
describe('when writing out a GetFeature request', function() {
|
||||
var text;
|
||||
before(function(done) {
|
||||
afterLoadText('spec/ol/format/wfs/GetFeatureMultiple.xml', function(xml) {
|
||||
text = xml;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('handles writing multiple Query elements', function() {
|
||||
var format = new ol.format.WFS();
|
||||
var serialized = format.writeGetFeature({
|
||||
featureNS: 'http://www.openplans.org/topp',
|
||||
featureTypes: ['states', 'cities'],
|
||||
featurePrefix: 'topp'
|
||||
});
|
||||
expect(serialized).to.xmleql(ol.xml.load(text));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user