r1141 - trunk/tests
r1141 - trunk/tests
Author: rdworth
Date: Sat Dec 13 02:57:10 2008
New Revision: 1141
Modified:
trunk/tests/dialog.js
Log:
Added test for #3664 - Dialog init fails on disconnected DOM Element
after .remove()
Modified: trunk/tests/dialog.js
==============================================================================
--- trunk/tests/dialog.js (original)
+++ trunk/tests/dialog.js Sat Dec 13 02:57:10 2008
@@ -115,7 +115,7 @@
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 @@
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');