File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ test( "{ collapsible: true }", function() {
107107
108108// TODO: add event tests
109109
110- // TODO: add more header tests
111110test ( "{ header: default }" , function ( ) {
112111 // default: > li > :first-child,> :not(li):even
113112 // > :not(li):even
@@ -116,6 +115,19 @@ test( "{ header: default }", function() {
116115 state ( $ ( "#navigation" ) . accordion ( ) , 1 , 0 , 0 ) ;
117116} ) ;
118117
118+ test ( "{ header: custom }" , function ( ) {
119+ var ac = $ ( "#navigationWrapper" ) . accordion ( {
120+ header : "h2"
121+ } ) ;
122+ ac . find ( "h2" ) . each ( function ( ) {
123+ ok ( $ ( this ) . hasClass ( "ui-accordion-header" ) ) ;
124+ } ) ;
125+ equal ( ac . find ( ".ui-accordion-header" ) . length , 3 ) ;
126+ state ( ac , 1 , 0 , 0 ) ;
127+ ac . accordion ( "option" , "active" , 2 ) ;
128+ state ( ac , 0 , 0 , 1 ) ;
129+ } ) ;
130+
119131test ( "{ heightStyle: 'auto' }" , function ( ) {
120132 var ac = $ ( "#navigation" ) . accordion ( { heightStyle : "auto" } ) ;
121133 equalHeights ( ac , 95 , 130 ) ;
You can’t perform that action at this time.
0 commit comments