aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/sortable/sortable_tickets.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-02-06 02:41:46 +0000
committerRichard Worth <rdworth@gmail.com>2009-02-06 02:41:46 +0000
commitc7361062d0ef8901249eba03729dc6713495b473 (patch)
treecab08829af94f1bb47e7ee3268ee1e2bff355340 /tests/unit/sortable/sortable_tickets.js
parent81099914a90647e216d31356791ccb671d570103 (diff)
downloadjquery-ui-c7361062d0ef8901249eba03729dc6713495b473.tar.gz
jquery-ui-c7361062d0ef8901249eba03729dc6713495b473.zip
sortable unit tests - fixed el.css not a function
Diffstat (limited to 'tests/unit/sortable/sortable_tickets.js')
-rw-r--r--tests/unit/sortable/sortable_tickets.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/sortable/sortable_tickets.js b/tests/unit/sortable/sortable_tickets.js
index 53ef62ae9..e265c2f3a 100644
--- a/tests/unit/sortable/sortable_tickets.js
+++ b/tests/unit/sortable/sortable_tickets.js
@@ -3,6 +3,23 @@
*/
(function($) {
+var el, offsetBefore, offsetAfter, dragged;
+
+var drag = function(handle, dx, dy) {
+ offsetBefore = $(handle).offset();
+ $(handle).simulate("drag", {
+ dx: dx || 0,
+ dy: dy || 0
+ });
+ dragged = { dx: dx, dy: dy };
+ offsetAfter = $(handle).offset();
+}
+
+var sort = function(handle, dx, dy, index, msg) {
+ drag(handle, dx, dy);
+ equals($(handle).parent().children().index(handle), index, msg);
+}
+
module("sortable: tickets");
test("#3019: Stop fires too early", function() {