From 714a77f202ee02b894992722d2e6b35b4089557e Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 3 Feb 2011 09:54:11 -0500 Subject: Accordion: Properly handle collapsible: false and active: false by changing active to 0. --- tests/unit/accordion/accordion_options.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index 8fcfdb172..71154d57a 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -17,17 +17,16 @@ test( "{ active: false }", function() { equals( ac.find( ".ui-accordion-header.ui-state-active" ).size(), 0, "no headers selected" ); equals( ac.accordion( "option", "active" ), false ); - // TODO: fix active: false when not collapsible -// ac.accordion( "option", "collapsible", false ); -// state( ac, 1, 0, 0 ); -// equals( ac.accordion( "option", "active" ), 0 ); -// -// ac.accordion( "destroy" ); -// ac.accordion({ -// active: false -// }); -// state( ac, 1, 0, 0 ); -// strictEqual( ac.accordion( "option", "active" ), 0 ); + ac.accordion( "option", "collapsible", false ); + state( ac, 1, 0, 0 ); + equals( ac.accordion( "option", "active" ), 0 ); + + ac.accordion( "destroy" ); + ac.accordion({ + active: false + }); + state( ac, 1, 0, 0 ); + strictEqual( ac.accordion( "option", "active" ), 0 ); }); test( "{ active: Number }", function() { -- cgit v1.2.3