Make sure we use the default featurePrefix

This commit is contained in:
bartvde
2017-06-15 16:33:07 +02:00
parent c46bc1f02a
commit 8d57a879ce
2 changed files with 28 additions and 4 deletions

View File

@@ -697,6 +697,29 @@ describe('ol.format.WFS', function() {
});
});
describe('when writing out a Transaction request', function() {
it('creates the correct update with default featurePrefix', function() {
var format = new ol.format.WFS();
var updateFeature = new ol.Feature();
updateFeature.setGeometryName('the_geom');
updateFeature.setGeometry(new ol.geom.MultiLineString([[
[-12279454, 6741885],
[-12064207, 6732101],
[-11941908, 6595126],
[-12240318, 6507071],
[-12416429, 6604910]
]]));
updateFeature.setId('FAULTS.4455');
var serialized = format.writeTransaction(null, [updateFeature], null, {
featureNS: 'http://foo',
featureType: 'FAULTS',
gmlOptions: {srsName: 'EPSG:900913'}
});
expect(serialized.firstChild.attributes.getNamedItem('xmlns:feature') !== null).to.equal(true);
});
});
describe('when writing out a Transaction request', function() {
it('does not create an update if no fid', function() {