diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-02-03 10:11:00 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-02-03 10:11:00 -0500 |
commit | a4da197a912b6171a0785da7982597a2ade9de52 (patch) | |
tree | 7acb9c34e6d0789a6357ed93e1102441d22093ef /tests | |
parent | 2e17770e5466fa41018cdd53a7bf999b162ce07a (diff) | |
download | jquery-ui-a4da197a912b6171a0785da7982597a2ade9de52.tar.gz jquery-ui-a4da197a912b6171a0785da7982597a2ade9de52.zip |
Accordion: Added tests for custom header option.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/accordion/accordion_options.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index d5a8194da..f27431a50 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -107,7 +107,6 @@ test( "{ collapsible: true }", function() { // TODO: add event tests -// TODO: add more header tests test( "{ header: default }", function() { // default: > li > :first-child,> :not(li):even // > :not(li):even @@ -116,6 +115,19 @@ test( "{ header: default }", function() { state( $( "#navigation" ).accordion(), 1, 0, 0); }); +test( "{ header: custom }", function() { + var ac = $( "#navigationWrapper" ).accordion({ + header: "h2" + }); + ac.find( "h2" ).each(function() { + ok( $( this ).hasClass( "ui-accordion-header" ) ); + }); + equal( ac.find( ".ui-accordion-header" ).length, 3 ); + state( ac, 1, 0, 0 ); + ac.accordion( "option", "active", 2 ); + state( ac, 0, 0, 1 ); +}); + test( "{ heightStyle: 'auto' }", function() { var ac = $( "#navigation" ).accordion({ heightStyle: "auto" }); equalHeights( ac, 95, 130 ); |