aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/droppable
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/droppable
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/droppable')
-rw-r--r--tests/unit/droppable/droppable_methods.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js
index 51f54089d..51cb65e74 100644
--- a/tests/unit/droppable/droppable_methods.js
+++ b/tests/unit/droppable/droppable_methods.js
@@ -28,7 +28,7 @@ test("init", function() {
});
test("destroy", function() {
- expect(6);
+ expect(7);
$("<div></div>").appendTo('body').droppable().droppable("destroy").remove();
ok(true, '.droppable("destroy") called on element');
@@ -47,10 +47,14 @@ test("destroy", function() {
$("<div></div>").droppable().droppable("destroy").data("foo.droppable", "bar");
ok(true, 'arbitrary option setter after destroy');
+
+ var expected = $('<div></div>').droppable(),
+ actual = expected.droppable('destroy');
+ equals(actual, expected, 'destroy is chainable');
});
test("enable", function() {
- expect(6);
+ expect(7);
el = $("#droppable1").droppable({ disabled: true });
shouldNotBeDroppable();
el.droppable("enable");
@@ -62,10 +66,14 @@ test("enable", function() {
el.data("disabled.droppable", false);
equals(el.data("disabled.droppable"), false, "disabled.droppable setter");
shouldBeDroppable();
+
+ var expected = $('<div></div>').droppable(),
+ actual = expected.droppable('enable');
+ equals(actual, expected, 'enable is chainable');
});
test("disable", function() {
- expect(6);
+ expect(7);
el = $("#droppable1").droppable({ disabled: false });
shouldBeDroppable();
el.droppable("disable");
@@ -77,6 +85,10 @@ test("disable", function() {
el.data("disabled.droppable", true);
equals(el.data("disabled.droppable"), true, "disabled.droppable setter");
shouldNotBeDroppable();
+
+ var expected = $('<div></div>').droppable(),
+ actual = expected.droppable('disable');
+ equals(actual, expected, 'disable is chainable');
});
})(jQuery);