Skip to content

Commit 9549686

Browse files
committed
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.
1 parent f1180e5 commit 9549686

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

tests/unit/tabs/tabs_deprecated.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,23 @@ test( "panel ids", function() {
2222

2323
module( "tabs (deprecated): options" );
2424

25-
test('ajaxOptions', function() {
26-
ok(false, "missing test - untested code is broken code.");
25+
asyncTest( "ajaxOptions", function() {
26+
expect( 1 );
27+
28+
var element = $( "#tabs2" ).tabs({
29+
ajaxOptions: {
30+
converters: {
31+
"text html": function() {
32+
return "test";
33+
}
34+
}
35+
}
36+
});
37+
element.one( "tabsload", function( event, ui ) {
38+
equals( ui.panel.html(), "test" );
39+
start();
40+
});
41+
element.tabs( "option", "active", 2 );
2742
});
2843

2944
test('cache', function() {
@@ -419,4 +434,8 @@ test( "url", function() {
419434
element.tabs( "option", "active", 3 );
420435
});
421436

437+
test( "abort", function() {
438+
ok( false, "missing test - untested code is broken code." );
439+
});
440+
422441
}( jQuery ) );

0 commit comments

Comments
 (0)