diff options
author | David Petersen <public@petersendidit.com> | 2011-03-26 15:00:39 -0400 |
---|---|---|
committer | David Petersen <public@petersendidit.com> | 2011-03-26 21:00:34 -0400 |
commit | aeaaf93ebb51ab6ff61a42d365edfd3872ae2ebd (patch) | |
tree | ab95271fe1860014ed4f8f82d8a207ed3e1d3759 /tests/unit/tabs/tabs_events.js | |
parent | 03ef2fb4525dc57cd397bfebf7b1f97e696ca3ff (diff) | |
download | jquery-ui-aeaaf93ebb51ab6ff61a42d365edfd3872ae2ebd.tar.gz jquery-ui-aeaaf93ebb51ab6ff61a42d365edfd3872ae2ebd.zip |
Tabs: Add beforeload event; deprecate ajaxOptions and cache options. Fixes #7131 Tabs: Add beforeload event; deprecate ajaxOptions and cache options
Diffstat (limited to 'tests/unit/tabs/tabs_events.js')
-rw-r--r-- | tests/unit/tabs/tabs_events.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/tabs/tabs_events.js b/tests/unit/tabs/tabs_events.js index 24fb62f9b..26ea76fb4 100644 --- a/tests/unit/tabs/tabs_events.js +++ b/tests/unit/tabs/tabs_events.js @@ -26,6 +26,25 @@ test('select', function() { equals( evenObj.originalEvent.type, "click", "select triggered by click" ); }); +test('beforeload', function() { + expect( 5 ); + + el = $('#tabs2'); + + el.tabs({ + selected: 2, + beforeload: function( event, ui ) { + ok( $.isFunction( ui.jqXHR.promise ), 'contain jqXHR object'); + equals( ui.settings.url, "data/test.html", 'contain ajax settings url'); + equals( ui.tab, el.find('a')[ 2 ], 'contain tab as DOM anchor element'); + equals( ui.panel, el.find('div')[ 2 ], 'contain panel as DOM div element'); + equals( ui.index, 2, 'contain index'); + event.preventDefault(); + } + }); + +}); + test('load', function() { ok(false, "missing test - untested code is broken code."); }); |