diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-05-09 14:45:57 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-09 14:45:57 -0400 |
commit | 9549686cb35b877740aca388286d71ad04311a2d (patch) | |
tree | 800ecbb45039c242d0c2a6c3457fb4e5a1077f6b /tests/unit/tabs | |
parent | f1180e5341aac31349877de3207fb7da558985fa (diff) | |
download | jquery-ui-9549686cb35b877740aca388286d71ad04311a2d.tar.gz jquery-ui-9549686cb35b877740aca388286d71ad04311a2d.zip |
Tabs: Added test for ajaxOptions. Partial fix for #7131 - Tabs: Add beforeload event; deprecate ajaxOptions and cache options.
Thanks gnarf for the unit test idea.
Diffstat (limited to 'tests/unit/tabs')
-rw-r--r-- | tests/unit/tabs/tabs_deprecated.js | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/unit/tabs/tabs_deprecated.js b/tests/unit/tabs/tabs_deprecated.js index 0094bc4f7..e5f7b7568 100644 --- a/tests/unit/tabs/tabs_deprecated.js +++ b/tests/unit/tabs/tabs_deprecated.js @@ -22,8 +22,23 @@ test( "panel ids", function() { module( "tabs (deprecated): options" ); -test('ajaxOptions', function() { - ok(false, "missing test - untested code is broken code."); +asyncTest( "ajaxOptions", function() { + expect( 1 ); + + var element = $( "#tabs2" ).tabs({ + ajaxOptions: { + converters: { + "text html": function() { + return "test"; + } + } + } + }); + element.one( "tabsload", function( event, ui ) { + equals( ui.panel.html(), "test" ); + start(); + }); + element.tabs( "option", "active", 2 ); }); test('cache', function() { @@ -419,4 +434,8 @@ test( "url", function() { element.tabs( "option", "active", 3 ); }); +test( "abort", function() { + ok( false, "missing test - untested code is broken code." ); +}); + }( jQuery ) ); |