diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 20:51:09 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-20 20:51:09 -0400 |
commit | 8fa9ed7cbc10d8fb1c37dde5d78c9041b20c3296 (patch) | |
tree | c5fb4489ea59cc195f12adae02d01eaf1cd12f35 | |
parent | f99068bb4ff7fc0ceec154ac8e3b63e088246047 (diff) | |
download | jquery-ui-8fa9ed7cbc10d8fb1c37dde5d78c9041b20c3296.tar.gz jquery-ui-8fa9ed7cbc10d8fb1c37dde5d78c9041b20c3296.zip |
Tabs: Added tests for select event.
-rw-r--r-- | tests/unit/tabs/tabs_events.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/unit/tabs/tabs_events.js b/tests/unit/tabs/tabs_events.js index d0bc5fee2..1203d02df 100644 --- a/tests/unit/tabs/tabs_events.js +++ b/tests/unit/tabs/tabs_events.js @@ -6,7 +6,18 @@ module("tabs: events"); test('select', function() { - ok(false, "missing test - untested code is broken code."); + expect(6); + el = $('#tabs1').tabs({ + select: function(event, ui) { + ok(true, 'select triggered after initialization'); + equals(this, el[0], "context of callback"); + equals(event.type, 'tabsselect', 'event type in callback'); + equals(ui.tab, el.find('a')[1], 'contain tab as DOM anchor element'); + equals(ui.panel, el.find('div')[1], 'contain panel as DOM div element'); + equals(ui.index, 1, 'contain index'); + } + }); + el.tabs('select', 1); }); test('load', function() { |