Add support for writing Native

This commit is contained in:
Bart van den Eijnden
2014-03-10 15:24:00 +01:00
parent 4e5e75f525
commit 33abbfced1
3 changed files with 58 additions and 4 deletions

View File

@@ -0,0 +1 @@
<wfs:Transaction 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:Native vendorId="ORACLE" safeToIgnore="true">ALTER SESSION ENABLE PARALLEL DML</wfs:Native><wfs:Native vendorId="ORACLE" safeToIgnore="false">Another native line goes here</wfs:Native></wfs:Transaction>

View File

@@ -234,6 +234,31 @@ describe('ol.format.WFS', function() {
});
describe('when writing out a Transaction request', function() {
var text;
before(function(done) {
afterLoadText('spec/ol/format/wfs/Native.xml', function(xml) {
text = xml;
done();
});
});
it('handles writing out Native', function() {
var format = new ol.format.WFS();
var serialized = format.writeTransaction(null, null, null, {
nativeElements: [{
vendorId: 'ORACLE',
safeToIgnore: true,
value: 'ALTER SESSION ENABLE PARALLEL DML'
}, {
vendorId: 'ORACLE',
safeToIgnore: false,
value: 'Another native line goes here'
}]
});
expect(serialized).to.xmleql(ol.xml.load(text));
});
});
});