diff --git a/test/spec/ol/format/wfs.test.js b/test/spec/ol/format/wfs.test.js
index 59a33946d8..d3c407f18c 100644
--- a/test/spec/ol/format/wfs.test.js
+++ b/test/spec/ol/format/wfs.test.js
@@ -1532,5 +1532,68 @@ describe('ol.format.WFS', function () {
expect(features.length).to.be(1);
expect(features[0]).to.be.an(Feature);
});
+
+ describe('when writing out a Transaction request', function () {
+ it('creates a handle', function () {
+ const text =
+ '';
+ const serialized = new WFS({
+ version: '2.0.0',
+ }).writeTransaction(null, null, null, {
+ handle: 'handle_t',
+ });
+ expect(serialized).to.xmleql(parse(text));
+ });
+ });
+
+ describe('when writing out a Transaction request', function () {
+ it('creates the correct srsName', function () {
+ const text = `
+
+
+
+
+
+
+
+ -5178372.1885436 1992365.7775042 -4434792.7774889 1601008.1927386 -4043435.1927233 2148908.8114105
+
+
+
+
+ xyz
+
+
+
+ `.trim();
+ const format = new WFS({
+ version: '2.0.0',
+ });
+ const insertFeature = new Feature({
+ the_geom: new MultiLineString([
+ [
+ [-5178372.1885436, 1992365.7775042],
+ [-4434792.7774889, 1601008.1927386],
+ [-4043435.1927233, 2148908.8114105],
+ ],
+ ]),
+ TYPE: 'xyz',
+ });
+ insertFeature.setGeometryName('the_geom');
+ const inserts = [insertFeature];
+ const serialized = format.writeTransaction(inserts, null, null, {
+ featureNS: 'http://foo',
+ featureType: 'FAULTS',
+ featurePrefix: 'feature',
+ gmlOptions: {multiCurve: true, srsName: 'EPSG:900913'},
+ });
+ expect(serialized).to.xmleql(parse(text));
+ });
+ });
});
});