Add setUrl tests
This commit is contained in:
@@ -253,6 +253,9 @@ describe('ol.source.TileArcGISRest', function() {
|
|||||||
var urls = source.getUrls();
|
var urls = source.getUrls();
|
||||||
|
|
||||||
expect(urls).to.eql(['http://test3.com/MapServer']);
|
expect(urls).to.eql(['http://test3.com/MapServer']);
|
||||||
|
|
||||||
|
var tileUrl = source.tileUrlFunction([0, 0, 0], 1, ol.proj.get('EPSG:4326'));
|
||||||
|
expect(tileUrl.indexOf(urls[0])).to.be(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -258,6 +258,14 @@ describe('ol.source.TileWMS', function() {
|
|||||||
expect(uri.getFragment()).to.be.empty();
|
expect(uri.getFragment()).to.be.empty();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('#setUrl()', function() {
|
||||||
|
var source = new ol.source.TileWMS(options);
|
||||||
|
var url = 'http://foo/';
|
||||||
|
source.setUrl(url);
|
||||||
|
var tileUrl = source.tileUrlFunction([0, 0, 0], 1, ol.proj.get('EPSG:4326'));
|
||||||
|
expect(tileUrl.indexOf(url)).to.be(0);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user