]> source.dussan.org Git - jquery-ui.git/commitdiff
Spinner tests: Added test for widget() method.
authorScott González <scott.gonzalez@gmail.com>
Mon, 27 Aug 2012 00:19:35 +0000 (20:19 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 27 Aug 2012 00:19:35 +0000 (20:19 -0400)
tests/unit/spinner/spinner_methods.js

index bafd949a76d23e7e46f83fe5bee25a689561decf..af872f25763539b1eb229c0d9c55e56e6f21c413 100644 (file)
@@ -163,4 +163,12 @@ test( "value", function() {
        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 );