diff options
author | David Serduke <davidserduke@gmail.com> | 2007-11-28 22:23:40 +0000 |
---|---|---|
committer | David Serduke <davidserduke@gmail.com> | 2007-11-28 22:23:40 +0000 |
commit | 3ae5fbc16a60cf3f41a1c6166a65dd473e904eb1 (patch) | |
tree | a6178ba6f7d96a2eb74a8eac4210ac6246ec8fda /test/unit/event.js | |
parent | 5c6c99361f315bfbc5829be3af94499c3a107f5d (diff) | |
download | jquery-3ae5fbc16a60cf3f41a1c6166a65dd473e904eb1.tar.gz jquery-3ae5fbc16a60cf3f41a1c6166a65dd473e904eb1.zip |
Fixed #1701 by passing through the arguments as suggested.
Diffstat (limited to 'test/unit/event.js')
-rw-r--r-- | test/unit/event.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 593c6dad8..47da9b698 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -172,7 +172,7 @@ test("trigger(event, [data], [fn])", function() { }); test("toggle(Function, Function)", function() { - expect(4); + expect(5); var count = 0, fn1 = function(e) { count++; }, fn2 = function(e) { count--; }, @@ -180,7 +180,11 @@ test("toggle(Function, Function)", function() { link = $('#mark'); link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click(); ok( count == 1, "Check for toggle(fn, fn)" ); - + + $("#firstp").toggle(function () { + equals(arguments.length, 4, "toggle correctly passes through additional triggered arguments, see #1701" ) + }, function() {}).trigger("click", [ 1, 2, 3 ]); + var first = 0; $("#simon1").one("click", function() { ok( true, "Execute event only once" ); |