Add test for ol.projection.configureProj4jsProjection

This commit is contained in:
Bruno Binet
2013-03-07 01:05:50 +01:00
parent b6d57894b4
commit 4415f8ac74

View File

@@ -337,6 +337,27 @@ describe('ol.projection', function() {
});
describe('ol.projection.configureProj4jsProjection()', function() {
beforeEach(function() {
ol.projection.proj4jsProjections_ = {};
});
it('returns a configured projection', function() {
var extent = new ol.Extent(
485869.5728, 76443.1884, 837076.5648, 299941.7864);
var epsg21781 = ol.projection.configureProj4jsProjection({
code: 'EPSG:21781',
extent: extent
});
expect(epsg21781.getCode()).toEqual('EPSG:21781');
expect(epsg21781.getExtent()).toBe(extent);
expect(epsg21781.getUnits()).toBe(ol.ProjectionUnits.METERS);
expect(epsg21781.isGlobal()).toBeFalsy();
});
});
});
goog.require('goog.array');