Skip to content
Permalink
Browse files

Failing test for #4037 (droppable: cssNamespace option should be remo…

…ved, addClasses option added)
  • Loading branch information
rdworth committed Feb 2, 2009
1 parent 60b7c7e commit 977c6e955d8ba1ea7bc1107e739c2cf7d7cf842a
Showing with 13 additions and 1 deletion.
  1. +1 −1 tests/unit/droppable/droppable_defaults.js
  2. +12 −0 tests/unit/droppable/droppable_options.js
@@ -3,9 +3,9 @@
*/

var droppable_defaults = {
addClasses: true,
accept: '*',
activeClass: false,
cssNamespace: "ui",
disabled: false,
greedy: false,
hoverClass: false,
@@ -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 = $("<div></div>").droppable({ addClasses: true });
ok(el.is(".ui-droppable"), "'ui-droppable' class added");
});

test("{ addClasses: false }", function() {
el = $("<div></div>").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 = $("<div></div>").droppable({ cssNamespace: "ui" });

0 comments on commit 977c6e9

Please sign in to comment.
You can’t perform that action at this time.