aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-02-11 16:01:23 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-02-11 16:01:23 +0100
commitc4a7f45dbcd389fa823ee1973ca1fd4a13f6704a (patch)
tree7fa7ffeeb598ac349e59754f67574673a8e28234 /tests
parentcfa4833fe95b558359560b911e33b7f68a846054 (diff)
downloadjquery-ui-c4a7f45dbcd389fa823ee1973ca1fd4a13f6704a.tar.gz
jquery-ui-c4a7f45dbcd389fa823ee1973ca1fd4a13f6704a.zip
Tooltip: Added missing items test
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/tooltip/tooltip.html3
-rw-r--r--tests/unit/tooltip/tooltip_options.js10
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 @@
<ol id="qunit-tests">
</ol>
-<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
+<div id="qunit-fixture">
<div>
<a id="tooltipped1" href="#" title="anchortitle">anchor</a>
<input title="inputtitle" />
+ <span data-tooltip="text">span</span>
</div>
</div>
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() {