Added tests

This commit is contained in:
Christopher Eykamp
2013-01-18 15:58:49 +01:00
parent 459e38c2d6
commit 5bb5530fd7

View File

@@ -238,7 +238,7 @@
}
function test_contactinfo(t) {
t.plan(15);
t.plan(18);
var xml = document.getElementById("ogcsample").firstChild.nodeValue;
var doc = new OpenLayers.Format.XML().read(xml);
@@ -246,6 +246,10 @@
var obj = new OpenLayers.Format.WMSCapabilities().read(doc);
var service = obj.service;
t.eq(personPrimary.name, "OGC:WMS", "name parsed correctly");
t.eq(personPrimary.title, "Acme Corp. Map Server", "title parsed correctly");
t.eq(personPrimary.abstract, "WMT Map Server maintained by Acme Corporation. Contact: webmaster@wmt.acme.com. High-quality maps showing roadrunner nests and possible ambush locations.", "abstract parsed correctly");
var contactinfo = service.contactInformation;
t.ok(contactinfo, "object contains contactInformation property");