From c4a7f45dbcd389fa823ee1973ca1fd4a13f6704a Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Fri, 11 Feb 2011 16:01:23 +0100 Subject: [PATCH] Tooltip: Added missing items test --- tests/unit/tooltip/tooltip.html | 3 ++- tests/unit/tooltip/tooltip_options.js | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/unit/tooltip/tooltip.html b/tests/unit/tooltip/tooltip.html index 64efb72e1..086192d4f 100644 --- a/tests/unit/tooltip/tooltip.html +++ b/tests/unit/tooltip/tooltip.html @@ -35,10 +35,11 @@
-
+
anchor + span
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index 6962d1e86..ea4b14229 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -11,7 +11,15 @@ module("tooltip: options", { test("option: items", function() { - ok(false, "missing items test"); + var event = $.Event("mouseenter"); + event.target = $("[data-tooltip]"); + $("#qunit-fixture").tooltip({ + items: "[data-tooltip]", + content: function() { + return $(this).attr("data-tooltip"); + } + }).tooltip("open", event); + same( $(".ui-tooltip").text(), "text" ); }); test("content: default", function() { -- 2.39.5