Skip to content
Permalink
Browse files

Accordion: Added tests for custom header option.

  • Loading branch information
scottgonzalez committed Feb 3, 2011
1 parent 2e17770 commit a4da197a912b6171a0785da7982597a2ade9de52
Showing with 13 additions and 1 deletion.
  1. +13 −1 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 );

0 comments on commit a4da197

Please sign in to comment.
You can’t perform that action at this time.