Restored /g flag to rspaces; Adds unit tests; Supplements #9008

This commit is contained in:
Rick Waldron 2011-04-28 21:14:12 -04:00
parent e5f4ec846c
commit ca367674c1
2 changed files with 17 additions and 1 deletions

View file

@ -68,6 +68,22 @@ test("bind(), multiple events at once", function() {
equals( mouseoverCounter, 1, "bind() with multiple events at once" );
});
test("bind(), five events at once", function() {
expect(1);
var count = 0,
handler = function(event) {
count++;
};
jQuery("#firstp").bind("click mouseover foo bar baz", handler)
.trigger("click").trigger("mouseover")
.trigger("foo").trigger("bar")
.trigger("baz");
equals( count, 5, "bind() five events at once" );
});
test("bind(), multiple events at once and namespaces", function() {
expect(7);