diff --git a/test/spec/ol/format/kmlformat.test.js b/test/spec/ol/format/kmlformat.test.js
index ce46fc54b4..ce3c17332c 100644
--- a/test/spec/ol/format/kmlformat.test.js
+++ b/test/spec/ol/format/kmlformat.test.js
@@ -2489,6 +2489,45 @@ describe('ol.format.KML', function() {
});
+ describe('#readNetworkLinks', function() {
+ it('returns empty array if no network links found', function() {
+ var text =
+ '' +
+ ' ' +
+ ' ' +
+ '';
+ var nl = format.readNetworkLinks(text);
+ expect(nl).to.have.length(0);
+ });
+
+ it('returns an array of network links', function() {
+ var text =
+ '' +
+ ' ' +
+ ' ' +
+ ' bar' +
+ ' ' +
+ ' bar/bar.kml' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' http://foo.com/foo.kml' +
+ ' ' +
+ ' ' +
+ ' ' +
+ '';
+ var nl = format.readNetworkLinks(text);
+ expect(nl).to.have.length(2);
+ expect(nl[0].name).to.be('bar');
+ expect(nl[0].href).to.be('bar/bar.kml');
+ expect(nl[1].href).to.be('http://foo.com/foo.kml');
+ });
+
+ });
+
});