aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-04-15 02:33:28 +0000
committerScott González <scott.gonzalez@gmail.com>2009-04-15 02:33:28 +0000
commit1195854aaad61308e7f5339eed54f92284d7666e (patch)
tree5991992a73f910d897967559332a15bd774816d8 /tests/unit/dialog
parent3c7b61299333d1ec3f4d4d773b1ec4296129a98e (diff)
downloadjquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.tar.gz
jquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.zip
Merged in widget-factory branch and added tests. Fixes #4411 - Widget factory should auto detect getters.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r--tests/unit/dialog/dialog_methods.js41
1 files changed, 40 insertions, 1 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js
index 897c74581..5748a27da 100644
--- a/tests/unit/dialog/dialog_methods.js
+++ b/tests/unit/dialog/dialog_methods.js
@@ -33,7 +33,7 @@ test("init", function() {
});
test("destroy", function() {
- expect(6);
+ expect(7);
$("<div></div>").appendTo('body').dialog().dialog("destroy").remove();
ok(true, '.dialog("destroy") called on element');
@@ -54,6 +54,31 @@ test("destroy", function() {
$('<div></div>').dialog().dialog("destroy").data("foo.dialog", "bar").remove();
ok(true, 'arbitrary option setter after destroy');
+
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('destroy');
+ equals(actual, expected, 'destroy is chainable');
+});
+
+test("enable", function() {
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('enable');
+ equals(actual, expected, 'enable is chainable');
+ ok(false, 'missing test - untested code is broken code');
+});
+
+test("disable", function() {
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('disable');
+ equals(actual, expected, 'disable is chainable');
+ ok(false, 'missing test - untested code is broken code');
+});
+
+test("close", function() {
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('close');
+ equals(actual, expected, 'close is chainable');
+ ok(false, 'missing test - untested code is broken code');
});
test("isOpen", function() {
@@ -72,4 +97,18 @@ test("isOpen", function() {
el.remove();
});
+test("moveToTop", function() {
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('moveToTop');
+ equals(actual, expected, 'moveToTop is chainable');
+ ok(false, 'missing test - untested code is broken code');
+});
+
+test("open", function() {
+ var expected = $('<div></div>').dialog(),
+ actual = expected.dialog('open');
+ equals(actual, expected, 'open is chainable');
+ ok(false, 'missing test - untested code is broken code');
+});
+
})(jQuery);