X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fevent.js;h=5efa0ec51de44941de5d7956d8f4ea05e5a11c8a;hb=3b50eaca2cd0b1439235e39c4e98a6438e8f55b2;hp=f3d314884f952acf7aac4bff3ce90485db650f01;hpb=9bd9ebdd73fe0e2d29fadf82947c98adde4023e7;p=jquery.git diff --git a/test/unit/event.js b/test/unit/event.js index f3d3148..5efa0ec 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1,5 +1,25 @@ module("event"); +test("null or undefined handler", function() { + expect(2); + // Supports Fixes bug #7229 + try { + + jQuery("#firstp").click(null); + + ok(true, "Passing a null handler will not throw an exception"); + + } catch (e) {} + + try { + + jQuery("#firstp").click(undefined); + + ok(true, "Passing an undefined handler will not throw an exception"); + + } catch (e) {} +}); + test("bind(), with data", function() { expect(3); var handler = function(event) {