diff --git a/tests/Control/SelectFeature.html b/tests/Control/SelectFeature.html
index 8d35f64be8..580327c6ea 100644
--- a/tests/Control/SelectFeature.html
+++ b/tests/Control/SelectFeature.html
@@ -11,7 +11,7 @@
var control = new OpenLayers.Control.SelectFeature(layer, options);
t.ok(control instanceof OpenLayers.Control.SelectFeature,
"new OpenLayers.Control.SelectFeature returns an instance");
- t.eq(control.layers[0], "bar",
+ t.eq(control.layer, "bar",
"constructor sets layer correctly");
// t.eq(control.handlers.feature.geometryTypes, "foo",
// "constructor sets options correctly on feature handler");
@@ -74,15 +74,14 @@
features[i] = {
id: Math.random(),
tested: 0,
- style: "",
- layer: layer
+ style: ""
};
}
// test that onSelect gets called properly
control.onSelect = function(feature) {
feature.tested += 1;
- t.eq(feature.id, features[feature.index].id,
+ t.eq(feature, features[feature.index],
"onSelect called with proper feature (" + feature.index + ")");
t.eq(feature.tested, feature.test,
"onSelect called only once for feature (" + feature.index + ")");
@@ -91,7 +90,7 @@
// test that onUnselect gets called properly
control.onUnselect = function(feature) {
feature.tested += 1;
- t.eq(feature.id, features[feature.index].id,
+ t.eq(feature, features[feature.index],
"onUnselect called with proper feature (" + feature.index + ")");
t.eq(feature.tested, feature.test,
"onUnselect called only once for feature (" + feature.index + ")");