r889 - trunk/tests

r889 - trunk/tests


Author: rdworth
Date: Sat Nov 8 14:19:28 2008
New Revision: 889
Modified:
trunk/tests/droppable.js
Log:
tests droppable - implemented cssNamespace test
Modified: trunk/tests/droppable.js
==============================================================================
--- trunk/tests/droppable.js    (original)
+++ trunk/tests/droppable.js    Sat Nov 8 14:19:28 2008
@@ -156,7 +156,15 @@
});
test("cssNamespace", function() {
-    ok(false, "missing test");
+    //cssNamespace should be appended with '-droppable' and added as className
+    el = $("<div></div>").droppable({ cssNamespace: "ui" });
+    equals(el[0].className, "ui-droppable");
+    el.droppable("destroy");
+
+    //no className should be added if cssNamepsace is null
+    el = $("<div></div>").droppable({ cssNamespace: null });
+    equals(el[0].className, "");
+    el.droppable("destroy");
});
test("greedy", function() {