diff options
author | Richard Worth <rdworth@gmail.com> | 2009-02-04 04:53:09 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2009-02-04 04:53:09 +0000 |
commit | 53f57ffdb52474db9a011a0bc38ee7943a02d177 (patch) | |
tree | fb006d16050c9a033b2e5aa4537fd18c539e3246 /tests/unit/selectable/selectable_events.js | |
parent | 96b1534483a7f5557e0c6cc795ae90faed44c22d (diff) | |
download | jquery-ui-53f57ffdb52474db9a011a0bc38ee7943a02d177.tar.gz jquery-ui-53f57ffdb52474db9a011a0bc38ee7943a02d177.zip |
selectable unit tests: split tests into individual files
Diffstat (limited to 'tests/unit/selectable/selectable_events.js')
-rw-r--r-- | tests/unit/selectable/selectable_events.js | 24 |
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); |