diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-08-26 20:21:24 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-08-26 20:21:24 -0400 |
commit | b22e3c36f27a9138ba2d1a665bdeded0b877ff6b (patch) | |
tree | f5fa96fc71076bac1abd5e69581ab5887d22efbd /tests/unit | |
parent | 072919467dec74e2c4b2b3af0ed005a861cf6ff9 (diff) | |
download | jquery-ui-b22e3c36f27a9138ba2d1a665bdeded0b877ff6b.tar.gz jquery-ui-b22e3c36f27a9138ba2d1a665bdeded0b877ff6b.zip |
Tooltip tests: Added test for widget() method.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index ef783cbd3..0af1e06e9 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -59,14 +59,12 @@ test( "enable/disable", function() { $.fx.off = false; }); -/* -TODO currently tooltip doesn't override widget -can't return anything useful if no element is kept around and there's no useful reference -test("widget", function() { - var tooltip = $("#tooltipped1").tooltip(); - deepEqual(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]); - deepEqual(tooltip.tooltip("widget").end()[0], tooltip[0]); +test( "widget", function() { + expect( 2 ); + var element = $( "#tooltipped1" ).tooltip(), + widgetElement = element.tooltip( "widget" ); + equal( widgetElement.length, 1, "one element" ); + strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" ); }); -*/ }( jQuery ) ); |