Skip to content

Commit

Permalink
Accordion: added a couple failing tests for option active: init and c…
Browse files Browse the repository at this point in the history
…ollapsed
  • Loading branch information
rdworth committed Aug 11, 2009
1 parent 7b506cf commit 5c5e083
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/unit/accordion/accordion_options.js
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5c5e083

Please sign in to comment.