From 9c48dff2869298cba6963d33e8b626500f5ff52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 11 Oct 2012 17:53:35 +0200 Subject: [PATCH] Add tests for ol.Map.prototype.disposeInternal --- test/spec/ol/map.test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/spec/ol/map.test.js b/test/spec/ol/map.test.js index 80fe996677..889c91edad 100644 --- a/test/spec/ol/map.test.js +++ b/test/spec/ol/map.test.js @@ -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() {