aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-05 12:52:02 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-05 12:52:02 -0400
commit0a31a828319493d6642ce876555e5383106ce039 (patch)
tree63a9c05a5233f6e4a5df147c466de559324687f0 /tests/unit/tooltip
parent96f2aa4c72b5f29782b0736ed95468e50d338d6e (diff)
downloadjquery-ui-0a31a828319493d6642ce876555e5383106ce039.tar.gz
jquery-ui-0a31a828319493d6642ce876555e5383106ce039.zip
Tooltip: Better cleanup on destroy. Fixes #8627 - The Tooltip destroy method is not clearing up the data properties.
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r--tests/unit/tooltip/tooltip_methods.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js
index 896e910c6..c846d216c 100644
--- a/tests/unit/tooltip/tooltip_methods.js
+++ b/tests/unit/tooltip/tooltip_methods.js
@@ -3,13 +3,20 @@
module( "tooltip: methods" );
test( "destroy", function() {
- expect( 2 );
+ expect( 3 );
+ var element = $( "#tooltipped1" );
+
domEqual( "#tooltipped1", function() {
- $( "#tooltipped1" ).tooltip().tooltip( "destroy" );
+ element.tooltip().tooltip( "destroy" );
});
// make sure that open tooltips are removed on destroy
- $( "#tooltipped1" ).tooltip().tooltip( "open" ).tooltip( "destroy" );
+ domEqual( "#tooltipped1", function() {
+ element
+ .tooltip()
+ .tooltip( "open", $.Event( "mouseover", { target: element[0] }) )
+ .tooltip( "destroy" );
+ });
equal( $( ".ui-tooltip" ).length, 0 );
});