From 008c7d582eb67ad73f0fd918123227e6960c335d Mon Sep 17 00:00:00 2001 From: Christopher Eykamp Date: Wed, 2 Jan 2013 12:51:52 +0100 Subject: [PATCH] Update test to reflect changes in last commit --- .../Format/WCSCapabilities/v1_1_0.js | 6 +++--- tests/Format/WCSCapabilities/v1.html | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js b/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js index 8dcb5f5e2f..5098d14a49 100644 --- a/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js +++ b/lib/OpenLayers/Format/WCSCapabilities/v1_1_0.js @@ -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); diff --git a/tests/Format/WCSCapabilities/v1.html b/tests/Format/WCSCapabilities/v1.html index 7579cdb98c..c38dd7256b 100644 --- a/tests/Format/WCSCapabilities/v1.html +++ b/tests/Format/WCSCapabilities/v1.html @@ -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"); }