});
test("bind()/trigger()/unbind() on plain object", function() {
- expect( 2 );
+ expect( 5 );
var obj = {};
ok( true, "Custom event run." );
});
- ok( jQuery(obj).data("events"), "Object has events bound." );
+ var events = jQuery(obj).data("events");
+ ok( events, "Object has events bound." );
+ equals( typeof events, "function", "'events' expando is a function on plain objects." );
+ equals( obj.test, undefined, "Make sure that test event is not on the plain object." );
+ equals( obj.handle, undefined, "Make sure that the event handler is not on the plain object." );
// Should trigger 1
jQuery(obj).trigger("test");