diff options
author | Alex Dovenmuehle <adovenmuehle@gmail.com> | 2011-01-11 15:38:47 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-01-11 15:38:47 -0500 |
commit | b6ed9328ef5254cae18c6f96bdd467c195f1e2fa (patch) | |
tree | 517f17e0b267b3a713cd06e092ab89d86f91812d /tests | |
parent | 04667b15180ddbbc88af9a0fe30ace91aef2ae15 (diff) | |
download | jquery-ui-b6ed9328ef5254cae18c6f96bdd467c195f1e2fa.tar.gz jquery-ui-b6ed9328ef5254cae18c6f96bdd467c195f1e2fa.zip |
Accordion: Deprecated icons.headerSelected in favor of icons.activeHeader. Fixes #6834 - Accordion: Change icons.headerSelected to icons.activeHeader.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/accordion/accordion_defaults.js | 4 | ||||
-rw-r--r-- | tests/unit/accordion/accordion_options.js | 17 |
2 files changed, 20 insertions, 1 deletions
diff --git a/tests/unit/accordion/accordion_defaults.js b/tests/unit/accordion/accordion_defaults.js index bf5725f30..d29c1e848 100644 --- a/tests/unit/accordion/accordion_defaults.js +++ b/tests/unit/accordion/accordion_defaults.js @@ -13,7 +13,9 @@ var accordion_defaults = { fillSpace: false, header: "> li > :first-child,> :not(li):even", heightStyle: null, - icons: { "header": "ui-icon-triangle-1-e", "headerSelected": "ui-icon-triangle-1-s" }, + icons: { "header": "ui-icon-triangle-1-e", + "activeHeader": null, + "headerSelected": "ui-icon-triangle-1-s" }, navigation: false, navigationFilter: function() {} }; diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index 26bcb19e5..331ceb924 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -163,6 +163,15 @@ test("{ icons: false }", function() { icons(false); }); +test("{ icons: { activeHeader : 'test' } }", function() { + var list = $("#list1"); + list.accordion( { icons: { "activeHeader": "test" } } ); + equals( $( "#list1 span.test" ).length, 1); + list.accordion("option", "icons", { "activeHeader": "news" } ); + equals( $( "#list1 span.test" ).length, 0); + equals( $( "#list1 span.news" ).length, 1); +}); + test("{ navigation: true, navigationFilter: header }", function() { $("#navigation").accordion({ navigation: true, @@ -183,4 +192,12 @@ test("{ navigation: true, navigationFilter: content }", function() { equals( $("#navigation .ui-accordion-content:eq(2)").size(), 1, "third content active" ); }); +test("change headerSelected option after creation", function() { + var list = $("#list1"); + list.accordion( { icons: { "activeHeader": "test" } } ); + equals( $( "#list1 span.test" ).length, 1); + list.accordion( "option", "icons", { "headerSelected": "deprecated" } ); + equals( $( "#list1 span.deprecated" ).length, 1); +}); + })(jQuery); |