r1962 - trunk/tests/unit/droppable
Author: rdworth
Date: Sun Feb 1 23:14:19 2009
New Revision: 1962
Modified:
trunk/tests/unit/droppable/droppable_defaults.js
trunk/tests/unit/droppable/droppable_options.js
Log:
Failing test for #4037 (droppable: cssNamespace option should be removed,
addClasses option added)
Modified: trunk/tests/unit/droppable/droppable_defaults.js
==============================================================================
--- trunk/tests/unit/droppable/droppable_defaults.js (original)
+++ trunk/tests/unit/droppable/droppable_defaults.js Sun Feb 1 23:14:19
2009
@@ -3,9 +3,9 @@
*/
var droppable_defaults = {
+ addClasses: true,
accept: '*',
activeClass: false,
- cssNamespace: "ui",
disabled: false,
greedy: false,
hoverClass: false,
Modified: trunk/tests/unit/droppable/droppable_options.js
==============================================================================
--- trunk/tests/unit/droppable/droppable_options.js (original)
+++ trunk/tests/unit/droppable/droppable_options.js Sun Feb 1 23:14:19 2009
@@ -17,6 +17,18 @@
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" });