Make sure we use the default featurePrefix
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user