From 0127806ee2100d65f136cec9b4449376883dfc58 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 8 Jan 2012 21:14:17 -0500 Subject: [PATCH] Assert that split control works with no geometry. --- tests/Control/Split.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Control/Split.html b/tests/Control/Split.html index a307bdd2c2..86af76c56d 100644 --- a/tests/Control/Split.html +++ b/tests/Control/Split.html @@ -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(); }