Skip to content
Permalink
Browse files

Added test for #3664 - Dialog init fails on disconnected DOM Element …

…after .remove()
  • Loading branch information
rdworth committed Dec 13, 2008
1 parent 350e2c1 commit 6bdc9f7c967c582869aa6ef9803c4a8fcdd24e93
Showing with 5 additions and 2 deletions.
  1. +5 −2 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');

0 comments on commit 6bdc9f7

Please sign in to comment.
You can’t perform that action at this time.