Add tests for ol.Map.prototype.disposeInternal

This commit is contained in:
Éric Lemoine
2012-10-11 17:53:35 +02:00
parent 2a76a23b6f
commit 9c48dff286

View File

@@ -1,7 +1,23 @@
goog.require('ol.Map');
goog.require('goog.dom');
describe('ol.Map', function() {
describe('dispose', function() {
var map;
beforeEach(function() {
map = new ol.Map({
target: document.getElementById('map')
});
});
it('removes the viewport from its parent', function() {
map.dispose();
expect(goog.dom.getParentElement(map.getViewport())).toBeNull();
});
});
describe('create constraints', function() {
describe('create resolution constraint', function() {