Add test to ensure the correct draw canvas size

This commit is contained in:
Andreas Hocevar
2016-08-23 11:49:53 +02:00
parent c1daf6f49f
commit 208ea171c3
2 changed files with 55 additions and 5 deletions

View File

@@ -265,11 +265,13 @@ describe('ol.source.TileWMS', function() {
});
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);
it('sets the correct url', 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);
});
});
describe('#setUrls()', function() {