Browse files

Adding an additional test to ensure the button's state actually changed.

  • Loading branch information...
1 parent a8dc0f9 commit 0ecbd65b7d0affcb33c9756bf1074f416441abea @tjvantoll committed Apr 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/unit/button/button_core.js
View
4 tests/unit/button/button_core.js
@@ -154,7 +154,7 @@ test( "#6262 - buttonset not applying ui-corner to invisible elements", function
});
asyncTest( "Resetting a button's form should refresh the visual state of the button widget to match.", function() {
- expect( 1 );
+ expect( 2 );
var form = $( "<form>" +
"<button></button>" +
"<label for='c1'></label><input id='c1' type='checkbox' checked>" +
@@ -163,6 +163,8 @@ asyncTest( "Resetting a button's form should refresh the visual state of the but
checkbox = form.find( "input[type=checkbox]" ).button();
checkbox.prop( "checked", false ).button( "refresh" );
+ ok( !checkbox.button( "widget" ).hasClass( "ui-state-active" ) );
+
form.get( 0 ).reset();
// #9213: If a button has been removed, refresh should not be called on it when

0 comments on commit 0ecbd65

Please sign in to comment.