From 11d378f36e87bee5a2861dcbf6735e2a32da5479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Sun, 26 Apr 2015 21:42:55 +0200 Subject: [PATCH] Restore Modify interaction constructor test --- test/spec/ol/interaction/modifyinteraction.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/spec/ol/interaction/modifyinteraction.test.js b/test/spec/ol/interaction/modifyinteraction.test.js index 5833e90bde..17807fabbb 100644 --- a/test/spec/ol/interaction/modifyinteraction.test.js +++ b/test/spec/ol/interaction/modifyinteraction.test.js @@ -78,6 +78,20 @@ describe('ol.interaction.Modify', function() { map.handleMapBrowserEvent(event); } + describe('constructor', function() { + it('adds features to the RTree', function() { + var feature = new ol.Feature( + new ol.geom.Point([0, 0])); + var features = new ol.Collection([feature]); + var modify = new ol.interaction.Modify({ + features: features + }); + var rbushEntries = modify.rBush_.getAll(); + expect(rbushEntries.length).to.be(1); + expect(rbushEntries[0].feature === feature).to.be.ok(); + }); + }); + describe('boundary modification', function() { it('clicking without drag should not add vertex but +r2', function() {