Assert that split control works with no geometry.

This commit is contained in:
Tim Schaub
2012-01-08 21:14:17 -05:00
parent fc43ea715a
commit 0127806ee2

View File

@@ -141,7 +141,7 @@
function test_isEligible(t) {
t.plan(9);
t.plan(10);
var control = new OpenLayers.Control.Split();
var geometry = OpenLayers.Geometry.fromWKT("LINESTRING(0 1, 1 2)");
@@ -176,6 +176,9 @@
control.targetFilter.value = "baz";
t.eq(control.isEligible(feature), true, "feature is eligible if it matches filter");
delete feature.geometry;
t.eq(control.isEligible(feature), false, "feature with no geometry is not eligible");
control.destroy();
}