Add imageSize regression test for ol.source.ImageWMS

This commit is contained in:
Andreas Hocevar
2015-11-16 15:12:30 +01:00
parent 18c41bfc19
commit f0dbedd39d

View File

@@ -173,6 +173,14 @@ describe('ol.source.ImageWMS', function() {
expect(image1).to.equal(image2); expect(image1).to.equal(image2);
}); });
it('calculates correct image size with ratio', function() {
options.ratio = 1.5;
var source = new ol.source.ImageWMS(options);
var extent = [10, 5, 30, 45];
source.getImage(extent, resolution, pixelRatio, projection);
expect(source.imageSize_).to.eql([300, 600]);
});
}); });
describe('#getGetFeatureInfo', function() { describe('#getGetFeatureInfo', function() {