diff options
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() { |