diff options
author | David Petersen <public@petersendidit.com> | 2011-02-06 14:49:42 -0500 |
---|---|---|
committer | David Petersen <public@petersendidit.com> | 2011-03-21 09:18:19 -0400 |
commit | 710d7620e7f713677a21fc5a8572581250499dd3 (patch) | |
tree | 04acd05f3051560553bd18c5927ee4dd01232dcd /tests/unit/tabs/tabs_options.js | |
parent | 5bc57a82c8a0bf89694ffc0744d9a6d3095b02b9 (diff) | |
download | jquery-ui-710d7620e7f713677a21fc5a8572581250499dd3.tar.gz jquery-ui-710d7620e7f713677a21fc5a8572581250499dd3.zip |
Tabs: Fix disable and enable methods to correctly handle when index is undefined. Use boolean when fully enabled/disabled. Allow selected tab to be disabled.Fixes #4386
Diffstat (limited to 'tests/unit/tabs/tabs_options.js')
-rw-r--r-- | tests/unit/tabs/tabs_options.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js index 4fb802b66..1c621ac28 100644 --- a/tests/unit/tabs/tabs_options.js +++ b/tests/unit/tabs/tabs_options.js @@ -67,17 +67,16 @@ test('disabled', function() { expect(4); el = $('#tabs1').tabs(); - same(el.tabs('option', 'disabled'), [ ], "should not disable any tab by default"); + same(el.tabs('option', 'disabled'), false, "should not disable any tab by default"); el.tabs('option', 'disabled', [ 1 ]); same(el.tabs('option', 'disabled'), [ 1 ], "should set property"); // everything else is being tested in methods module... - // FIXME bug... property needs to be [ 1 ], since selected tab cannot be disabled! el.tabs('option', 'disabled', [ 0, 1 ]); - same(el.tabs('option', 'disabled'), [ 1 ], "should disable given tabs but not selected one"); // ... + same(el.tabs('option', 'disabled'), [ 0, 1 ], "should disable given tabs, even selected one"); // ... el.tabs('option', 'disabled', [ ]); - same(el.tabs('option', 'disabled'), [ ], "should not disable any tab"); // ... + same(el.tabs('option', 'disabled'), false, "should not disable any tab"); // ... }); test('event', function() { |