make sure we can have multiple feature ids in InsertResults

This commit is contained in:
Bart van den Eijnden
2012-11-21 13:08:37 +01:00
parent ec294af55a
commit 195352c403
3 changed files with 13 additions and 7 deletions
+5 -3
View File
@@ -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 @@
<div id="Transaction_Response"><!--
<wfs:WFS_TransactionResponse version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc">
<wfs:InsertResult>
<ogc:FeatureId fid="none"/>
<ogc:FeatureId fid="parcelle.40"/>
<ogc:FeatureId fid="parcelle.41"/>
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
+7 -3
View File
@@ -11,7 +11,7 @@
}
function test_read(t) {
t.plan(2);
t.plan(3);
var data = readXML("TransactionResponse");
var format = new OpenLayers.Format.WFST.v1_1_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");
}
@@ -137,7 +138,10 @@
<wfs:TransactionResults/>
<wfs:InsertResults>
<wfs:Feature>
<ogc:FeatureId fid="none"/>
<ogc:FeatureId fid="parcelle.40"/>
</wfs:Feature>
<wfs:Feature>
<ogc:FeatureId fid="parcelle.41"/>
</wfs:Feature>
</wfs:InsertResults>
</wfs:TransactionResponse>