Add support for writing Native
This commit is contained in:
1
test/spec/ol/format/wfs/Native.xml
Normal file
1
test/spec/ol/format/wfs/Native.xml
Normal 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>
|
||||
@@ -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));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user