diff --git a/lib/OpenLayers/Format/WFST/v1_0_0.js b/lib/OpenLayers/Format/WFST/v1_0_0.js index 62f52c6a16..746d5b8c83 100644 --- a/lib/OpenLayers/Format/WFST/v1_0_0.js +++ b/lib/OpenLayers/Format/WFST/v1_0_0.js @@ -103,7 +103,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( "InsertResult": function(node, container) { var obj = {fids: []}; this.readChildNodes(node, obj); - container.insertIds.push(obj.fids[0]); + container.insertIds = container.insertIds.concat(obj.fids); }, "TransactionResult": function(node, obj) { this.readChildNodes(node, obj); diff --git a/tests/Format/WFST/v1_0_0.html b/tests/Format/WFST/v1_0_0.html index 89d810e85e..a8fce797d3 100644 --- a/tests/Format/WFST/v1_0_0.html +++ b/tests/Format/WFST/v1_0_0.html @@ -11,7 +11,7 @@ } function test_read(t) { - t.plan(2); + t.plan(3); var data = readXML("Transaction_Response"); var format = new OpenLayers.Format.WFST.v1_0_0({ @@ -19,7 +19,8 @@ featureType: "states" }); var result = format.read(data); - t.eq(result.insertIds[0], "none", "InsertIds read correctly"); + t.eq(result.insertIds[0], "parcelle.40", "First InsertId read correctly"); + t.eq(result.insertIds[1], "parcelle.41", "Second InsertId read correctly"); t.eq(result.success, true, "Success read correctly"); } @@ -91,7 +92,8 @@