diff options
author | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-01-26 11:34:28 +0000 |
---|---|---|
committer | Klaus Hartl <klaus.hartl@googlemail.com> | 2009-01-26 11:34:28 +0000 |
commit | 43efa580dd09433840c0639262cf248eac082521 (patch) | |
tree | 1c082dded1c58918334a18e03353221671f14ffc /tests | |
parent | 03b1cfe4c489bcb0af2336e5e9a97593886a8c43 (diff) | |
download | jquery-ui-43efa580dd09433840c0639262cf248eac082521.tar.gz jquery-ui-43efa580dd09433840c0639262cf248eac082521.zip |
Tabs: organized code - public and private (pseudo) methods, added unit test for ui data object
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/tabs/tabs.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/tabs/tabs.js b/tests/unit/tabs/tabs.js index 916db903b..9a9c4f353 100644 --- a/tests/unit/tabs/tabs.js +++ b/tests/unit/tabs/tabs.js @@ -123,6 +123,21 @@ module('tabs'); }); + test('callback ui object', function() { + expect(3); + + var uiObj; + $('#tabs1').tabs({ + show: function(event, ui) { + uiObj = ui; + } + }); + equals(uiObj.tab, $('#tabs1 a')[0], 'should have tab as DOM anchor element'); + equals(uiObj.panel, $('#tabs1 div')[0], 'should have panel as DOM div element'); + equals(uiObj.index, 0, ' should have index'); + + }); + test('selected property', function() { expect(5); |