diff options
author | kborchers <kris.borchers@gmail.com> | 2012-05-24 23:44:51 -0500 |
---|---|---|
committer | kborchers <kris.borchers@gmail.com> | 2012-05-24 23:45:12 -0500 |
commit | fe7ca1f1c3922a301169256ed0614c5529e40454 (patch) | |
tree | 815e4686d2821e80112c12feb62f3a51b198ea34 /tests/unit/menu/menu_methods.js | |
parent | f63bb4fbc4899dacee2e55784bafc59b4a829954 (diff) | |
download | jquery-ui-fe7ca1f1c3922a301169256ed0614c5529e40454.tar.gz jquery-ui-fe7ca1f1c3922a301169256ed0614c5529e40454.zip |
Menu: Better handling of divider elements and menu items without anchors.
Diffstat (limited to 'tests/unit/menu/menu_methods.js')
-rw-r--r-- | tests/unit/menu/menu_methods.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index fc4fce4f1..c17986816 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -29,13 +29,17 @@ test( "enable/disable", function() { }); test( "refresh", function() { - expect( 3 ); + expect( 5 ); var menu = $( "#menu1" ).menu(); equal(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); menu.append("<li><a href='#'>test item</a></li>").menu("refresh"); equal(menu.find(".ui-menu-item").length,6,"Incorrect number of menu items"); menu.find(".ui-menu-item:last").remove().end().menu("refresh"); equal(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); + menu.append("<li>---</li>").menu("refresh"); + equal(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); + menu.children(":last").remove().end().menu("refresh"); + equal(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); }); test("destroy", function() { |