Add test for URL template expansion

This commit is contained in:
Guillaume Beraudo
2016-02-03 12:44:48 +01:00
committed by Frederic Junod
parent 04db1c3e4d
commit a910ab626a

View File

@@ -3,6 +3,17 @@ goog.provide('ol.test.source.UrlTile');
describe('ol.source.UrlTile', function() {
describe('url option', function() {
it('expands url template', function() {
var tileSource = new ol.source.UrlTile({
url: '{1-3}'
});
var urls = tileSource.getUrls();
expect(urls).to.eql(['1', '2', '3']);
});
});
describe('tileUrlFunction', function() {
var tileSource, tileGrid;