diff options
author | Richard Worth <rdworth@gmail.com> | 2008-12-13 10:57:10 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-12-13 10:57:10 +0000 |
commit | 6bdc9f7c967c582869aa6ef9803c4a8fcdd24e93 (patch) | |
tree | 0f60246f1e5e3588946e2849379f39a7629ea5d7 /tests | |
parent | 350e2c1a1b651fb2d5808a008fd41cd3bfaae796 (diff) | |
download | jquery-ui-6bdc9f7c967c582869aa6ef9803c4a8fcdd24e93.tar.gz jquery-ui-6bdc9f7c967c582869aa6ef9803c4a8fcdd24e93.zip |
Added test for #3664 - Dialog init fails on disconnected DOM Element after .remove()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dialog.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/dialog.js b/tests/dialog.js index 95e123a92..438db2e9d 100644 --- a/tests/dialog.js +++ b/tests/dialog.js @@ -115,7 +115,7 @@ function margin(el, side) { module("dialog"); test("init", function() { - expect(6); + expect(7); $("<div></div>").appendTo('body').dialog().remove(); ok(true, '.dialog() called on element'); @@ -124,7 +124,10 @@ test("init", function() { ok(true, '.dialog() called on empty collection'); $('<div></div>').dialog().remove(); - ok(true, '.dialog() called on disconnected DOMElement'); + ok(true, '.dialog() called on disconnected DOMElement - never connected'); + + $('<div></div>').appendTo('body').remove().dialog().remove(); + ok(true, '.dialog() called on disconnected DOMElement - removed'); $('<div></div>').dialog().dialog("foo").remove(); ok(true, 'arbitrary method called after init'); |