Filter strategy constructor should not need filter, r=tschaub,fredj (closes #2841)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10879 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2010-11-09 12:57:06 +00:00
parent c8c9b51e73
commit 66960d392f
2 changed files with 11 additions and 7 deletions
+9 -1
View File
@@ -21,7 +21,7 @@ var filter = new OpenLayers.Filter.Comparison({
function test_initialize(t) {
t.plan(3);
t.plan(4);
var strategy = new OpenLayers.Strategy.Filter({filter: filter});
@@ -31,6 +31,14 @@ function test_initialize(t) {
t.ok(strategy.filter === filter, "has filter");
strategy.destroy();
try {
strategy = new OpenLayers.Strategy.Filter();
t.ok(true, "strategy without filter works");
} catch (err) {
t.fail("strategy without filter should not throw");
}
}