Spinner tests: Added test for widget() method.

This commit is contained in:
Scott González 2012-08-26 20:19:35 -04:00
parent dc7c26b8d1
commit 383d0dbfae

View File

@ -163,4 +163,12 @@ test( "value", function() {
equal( element.spinner( "value" ), 9, "get value via value method" ); equal( element.spinner( "value" ), 9, "get value via value method" );
}); });
test( "widget", function() {
expect( 2 );
var element = $( "#spin" ).spinner(),
widgetElement = element.spinner( "widget" );
equal( widgetElement.length, 1, "one element" );
strictEqual( widgetElement[ 0 ], element.parent()[ 0 ], "parent element" );
});
})( jQuery ); })( jQuery );