aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r--tests/unit/draggable/draggable_defaults.js1
-rw-r--r--tests/unit/draggable/draggable_options.js12
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/draggable/draggable_defaults.js b/tests/unit/draggable/draggable_defaults.js
index 493ed9087..4b0aaca19 100644
--- a/tests/unit/draggable/draggable_defaults.js
+++ b/tests/unit/draggable/draggable_defaults.js
@@ -3,6 +3,7 @@
*/
var draggable_defaults = {
+ addClasses: true,
appendTo: "parent",
axis: false,
cancel: ":input,option",
diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js
index d5709576d..7039b3c56 100644
--- a/tests/unit/draggable/draggable_options.js
+++ b/tests/unit/draggable/draggable_options.js
@@ -23,6 +23,18 @@ var margin = function(el, side) { return parseInt(el.css('margin-' + side)); }
module("draggable: options");
+test("{ addClasses: true }, default", function() {
+ equals(draggable_defaults.addClasses, true);
+
+ el = $("<div></div>").draggable({ addClasses: true });
+ ok(el.is(".ui-draggable"), "'ui-draggable' class added");
+});
+
+test("{ addClasses: false }", function() {
+ el = $("<div></div>").draggable({ addClasses: false });
+ ok(!el.is(".ui.draggable"), "'ui-draggable' class not added");
+});
+
test("{ appendTo: 'parent' }, default", function() {
equals(draggable_defaults.appendTo, "parent");