aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/tooltip/tooltip_options.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js
index 17f0a4237..2d49533f2 100644
--- a/tests/unit/tooltip/tooltip_options.js
+++ b/tests/unit/tooltip/tooltip_options.js
@@ -100,6 +100,30 @@ test( "content: string", function() {
}).tooltip( "open" );
});
+test( "content: element", function() {
+ expect( 1 );
+ var content = "<p>this is a <i>test</i> of the emergency broadcast system.</p>",
+ element = $( content )[ 0 ];
+ $( "#tooltipped1" ).tooltip({
+ content: element,
+ open: function( event, ui ) {
+ equal( ui.tooltip.children().html().toLowerCase(), content );
+ }
+ }).tooltip( "open" );
+});
+
+test( "content: jQuery", function() {
+ expect( 1 );
+ var content = "<p>this is a <i>test</i> of the emergency broadcast system.</p>",
+ element = $( content );
+ $( "#tooltipped1" ).tooltip({
+ content: element,
+ open: function( event, ui ) {
+ equal( ui.tooltip.children().html().toLowerCase(), content );
+ }
+ }).tooltip( "open" );
+});
+
test( "items", function() {
expect( 2 );
var event,