From 5c5e0832d4856289694db65efee5bb4abb48dfee Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Tue, 11 Aug 2009 00:57:50 +0000 Subject: [PATCH] Accordion: added a couple failing tests for option active: init and collapsed --- tests/unit/accordion/accordion_options.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index 00b3dbb8c52..b03eea22319 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -6,7 +6,8 @@ module("accordion: options"); test("{ active: first child }, default", function() { - ok(false, 'missing test - untested code is broken code'); + $("#list1").accordion(); + equals( $("#list1").accordion('option', 'active'), 0); }); test("{ active: Selector }", function() { @@ -35,6 +36,7 @@ test("{ active: false }", function() { collapsible: true }); equals( $("#list1 .ui-accordion-header.ui-state-active").size(), 0, "no headers selected" ); + equals( $("#list1").accordion('option', 'active'), false); }); test("{ active: Number }", function() { @@ -93,7 +95,12 @@ test("{ collapsible: false }, default", function() { }); test("{ collapsible: true }", function() { - ok(false, 'missing test - untested code is broken code'); + $("#list1").accordion({ + active: 1, + collapsible: true + }); + $('.ui-accordion-header:eq(1)', '#list1').click(); + equals( $("#list1").accordion('option', 'active'), false); }); test("{ event: 'click' }, default", function() {