aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable/selectable_events.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/selectable/selectable_events.js')
-rw-r--r--tests/unit/selectable/selectable_events.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/unit/selectable/selectable_events.js b/tests/unit/selectable/selectable_events.js
index 3fa1552ba..03b65ab88 100644
--- a/tests/unit/selectable/selectable_events.js
+++ b/tests/unit/selectable/selectable_events.js
@@ -5,8 +5,28 @@
module("selectable: events");
-test("testname", function() {
- ok(false, "missing test - untested code is broken code.");
+test("start", function() {
+ expect(2);
+ el = $("#selectable1");
+ el.selectable({
+ start: function(ev, ui) {
+ ok(true, "drag fired start callback");
+ equals(this, el[0], "context of callback");
+ }
+ });
+ el.simulate("drag", 20, 20);
+});
+
+test("stop", function() {
+ expect(2);
+ el = $("#selectable1");
+ el.selectable({
+ start: function(ev, ui) {
+ ok(true, "drag fired stop callback");
+ equals(this, el[0], "context of callback");
+ }
+ });
+ el.simulate("drag", 20, 20);
});
})(jQuery);