aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_methods.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-08-27 14:48:17 -0400
committerScott González <scott.gonzalez@gmail.com>2010-08-27 14:48:17 -0400
commit1e28040cf358d0fe81ee83a2e35d7dbb65362afa (patch)
tree721a02ecfcfb52284e0d55a79ff303a5c98c4787 /tests/unit/dialog/dialog_methods.js
parent52a052be79d21aa519ccb513dc00a7c54868ef03 (diff)
downloadjquery-ui-1e28040cf358d0fe81ee83a2e35d7dbb65362afa.tar.gz
jquery-ui-1e28040cf358d0fe81ee83a2e35d7dbb65362afa.zip
Widget: Throw errors when calling non-existent methods or methods on uninistantiated widgets. Fixes #5972 - Widget: Throw error for non-existent method calls.
Diffstat (limited to 'tests/unit/dialog/dialog_methods.js')
-rw-r--r--tests/unit/dialog/dialog_methods.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js
index 93d1b25db..a961b4e03 100644
--- a/tests/unit/dialog/dialog_methods.js
+++ b/tests/unit/dialog/dialog_methods.js
@@ -10,7 +10,7 @@ module("dialog: methods", {
});
test("init", function() {
- expect(7);
+ expect(6);
$("<div></div>").appendTo('body').dialog().remove();
ok(true, '.dialog() called on element');
@@ -24,9 +24,6 @@ test("init", function() {
$('<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');
-
el = $('<div></div>').dialog();
var foo = el.dialog("option", "foo");
el.remove();
@@ -46,9 +43,6 @@ test("destroy", function() {
$('<div></div>').dialog().dialog("destroy").remove();
ok(true, '.dialog("destroy") called on disconnected DOMElement');
- $('<div></div>').dialog().dialog("destroy").dialog("foo").remove();
- ok(true, 'arbitrary method called after destroy');
-
var expected = $('<div></div>').dialog(),
actual = expected.dialog('destroy');
equals(actual, expected, 'destroy is chainable');