]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Update method tests - active option still works when accordion is disabled
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 7 Mar 2012 18:54:06 +0000 (19:54 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 7 Mar 2012 18:54:06 +0000 (19:54 +0100)
tests/unit/accordion/accordion_methods.js

index 9f61647c4522522c798b89f3730478295ddd4832..2f47220704f7289211d7ec00cd09fe0a53029708 100644 (file)
@@ -10,15 +10,19 @@ test( "destroy", function() {
 });
 
 test( "enable/disable", function() {
-       expect( 3 );
+       expect( 4 );
        var element = $( "#list1" ).accordion();
        accordion_state( element, 1, 0, 0 );
        element.accordion( "disable" );
-       element.accordion( "option", "active", 1 );
+       // event does nothing
+       element.find( ".ui-accordion-header" ).eq( 1 ).trigger( "click" );
        accordion_state( element, 1, 0, 0 );
-       element.accordion( "enable" );
+       // option still works
        element.accordion( "option", "active", 1 );
        accordion_state( element, 0, 1, 0 );
+       element.accordion( "enable" );
+       element.accordion( "option", "active", 2 );
+       accordion_state( element, 0, 0, 1 );
 });
 
 test( "refresh", function() {