Update test to reflect changes in last commit

This commit is contained in:
Christopher Eykamp
2013-01-02 12:51:52 +01:00
parent 15138605c3
commit 008c7d582e
2 changed files with 12 additions and 12 deletions

View File

@@ -67,13 +67,13 @@ OpenLayers.Format.WCSCapabilities.v1_1_0 = OpenLayers.Class(
request.contentMetadata = [];
this.readChildNodes(node, request.contentMetadata);
},
"CoverageSummary": function(node, contents) {
"CoverageSummary": function(node, contentMetadata) {
var coverageSummary = {};
// Read the summary:
this.readChildNodes(node, coverageSummary);
// Add it to the contents array:
contents.push(coverageSummary);
// Add it to the contentMetadata array:
contentMetadata.push(coverageSummary);
},
"Identifier": function(node, coverageSummary) {
coverageSummary.identifier = this.getChildValue(node);

View File

@@ -68,16 +68,16 @@
// Most of the parsing is handled by other objects, so not much actually requires testing here
t.ok(!res.error, "Parsing XML generated no errors");
t.eq(res.contents.length, 4, "number of features correct");
t.eq(res.contentMetadata.length, 4, "number of features correct");
var contents = res.contents[0];
t.eq(contents.identifier, "ro_dsm", "correct identifier");
t.eq(contents.title, "Rotterdam DSM", "correct title");
t.eq(contents.abstract, "Digital Surface Model (DSM) raster data set of inner city Rotterdam", "correct abstract");
t.eq(contents.supportedFormat.length, 1, "correct number of supported formats");
t.eq(contents.supportedFormat[0], "image/tiff", "correct format");
t.eq(contents.supportedCRS.length, 4, "correct number of CRS records");
t.eq(contents.supportedCRS[2], "urn:ogc:def:crs:EPSG::3857", "correct CRS");
var metadata = res.contentMetadata[0];
t.eq(metadata.identifier, "ro_dsm", "correct identifier");
t.eq(metadata.title, "Rotterdam DSM", "correct title");
t.eq(metadata.abstract, "Digital Surface Model (DSM) raster data set of inner city Rotterdam", "correct abstract");
t.eq(metadata.supportedFormat.length, 1, "correct number of supported formats");
t.eq(metadata.supportedFormat[0], "image/tiff", "correct format");
t.eq(metadata.supportedCRS.length, 4, "correct number of CRS records");
t.eq(metadata.supportedCRS[2], "urn:ogc:def:crs:EPSG::3857", "correct CRS");
}
</script>