diff options
Diffstat (limited to 'tests/unit/selectmenu/core.js')
-rw-r--r-- | tests/unit/selectmenu/core.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/selectmenu/core.js b/tests/unit/selectmenu/core.js index 689668e70..1c1a6b622 100644 --- a/tests/unit/selectmenu/core.js +++ b/tests/unit/selectmenu/core.js @@ -329,4 +329,22 @@ $.each( [ } ); } ); + asyncTest( "Selectmenu should reset when its parent form resets", function() { + expect( 2 ); + + var element = $( "#speed" ).selectmenu(), + widget = element.selectmenu( "widget" ), + initialValue = element.val(), + form = element.closest( "form" ); + + element.val( "Slower" ); + element.selectmenu( "refresh" ); + equal( $.trim( widget.text() ), "Slower" ); + form[ 0 ].reset(); + setTimeout( function() { + equal( $.trim( widget.text() ), initialValue ); + start(); + } ); + } ); + } ); |