From 977c6e955d8ba1ea7bc1107e739c2cf7d7cf842a Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 2 Feb 2009 07:14:19 +0000 Subject: [PATCH] Failing test for #4037 (droppable: cssNamespace option should be removed, addClasses option added) --- tests/unit/droppable/droppable_defaults.js | 2 +- tests/unit/droppable/droppable_options.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/unit/droppable/droppable_defaults.js b/tests/unit/droppable/droppable_defaults.js index 0c25bb686..1c175631b 100644 --- a/tests/unit/droppable/droppable_defaults.js +++ b/tests/unit/droppable/droppable_defaults.js @@ -3,9 +3,9 @@ */ var droppable_defaults = { + addClasses: true, accept: '*', activeClass: false, - cssNamespace: "ui", disabled: false, greedy: false, hoverClass: false, diff --git a/tests/unit/droppable/droppable_options.js b/tests/unit/droppable/droppable_options.js index a6b5bbe75..2df2dcb15 100644 --- a/tests/unit/droppable/droppable_options.js +++ b/tests/unit/droppable/droppable_options.js @@ -17,6 +17,18 @@ test("activeClass", function() { ok(false, 'missing test - untested code is broken code'); }); +test("{ addClasses: true }, default", function() { + equals(droppable_defaults.addClasses, true); + + el = $("
").droppable({ addClasses: true }); + ok(el.is(".ui-droppable"), "'ui-droppable' class added"); +}); + +test("{ addClasses: false }", function() { + el = $("
").droppable({ addClasses: false }); + ok(!el.is(".ui-droppable"), "'ui-droppable' class not added"); +}); + test("cssNamespace", function() { //cssNamespace should be appended with '-droppable' and added as className el = $("
").droppable({ cssNamespace: "ui" });