]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update js/tests/unit/bootstrap-tooltip.js
authorYohn <john.skem9@gmail.com>
Sun, 23 Dec 2012 09:21:02 +0000 (04:21 -0500)
committerYohn <john.skem9@gmail.com>
Sun, 23 Dec 2012 09:21:02 +0000 (04:21 -0500)
js/tests/unit/bootstrap-tooltip.js

index c44f75757a161fd951f21f517cd745f91da04706..a2206f2d7c83cd2a97fcda6816f823a4796e151e 100644 (file)
@@ -164,4 +164,14 @@ $(function () {
           .tooltip('toggle')
         ok($(".tooltip").is('.fade.in'), 'tooltip should be toggled in')
       })
+
+      test("should place tooltips inside the body", function () {
+        var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
+          .appendTo('#qunit-fixture')
+          .tooltip({container:'body'})
+          .tooltip('show')
+        ok($("body > .tooltip").length, 'inside the body')
+        ok(!$("#qunit-fixture > .tooltip").length, 'not found in parent')
+        tooltip.tooltip('hide')
+      })
 })