From: Scott González Date: Wed, 21 Jul 2010 00:51:09 +0000 (-0400) Subject: Tabs: Added tests for select event. X-Git-Tag: 1.8.3~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8fa9ed7cbc10d8fb1c37dde5d78c9041b20c3296;p=jquery-ui.git Tabs: Added tests for select event. --- 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() {