aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
diff options
context:
space:
mode:
authorfat-kun <[email protected]>2012-12-22 14:53:24 -0800
committerfat-kun <[email protected]>2012-12-22 14:53:24 -0800
commitd09b46fe378819e80ac75ffc7118fed11ca8da03 (patch)
treeffb016026af24adccea95f3eb0600f91d31f99e5 /js/tests/unit
parenteffba9e55c9598985a6be6acd6711ceb9daf2fb1 (diff)
parenta6705246d048ade327c5f93b4cc610ffbba86ee6 (diff)
downloadbootstrap-d09b46fe378819e80ac75ffc7118fed11ca8da03.tar.xz
bootstrap-d09b46fe378819e80ac75ffc7118fed11ca8da03.zip
Merge pull request #6349 from Yohn/patch-6
Fixes #5753 with tooltip('toogle')
Diffstat (limited to 'js/tests/unit')
-rw-r--r--js/tests/unit/bootstrap-tooltip.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js
index ba5134743..c44f75757 100644
--- a/js/tests/unit/bootstrap-tooltip.js
+++ b/js/tests/unit/bootstrap-tooltip.js
@@ -156,4 +156,12 @@ $(function () {
div.find('a').trigger('click')
ok($(".tooltip").is('.fade.in'), 'tooltip is faded in')
})
-}) \ No newline at end of file
+
+ test("should show tooltip when toggle is called", function () {
+ var tooltip = $('<a href="#" rel="tooltip" title="tooltip on toggle"></a>')
+ .appendTo('#qunit-fixture')
+ .tooltip({trigger: 'manual'})
+ .tooltip('toggle')
+ ok($(".tooltip").is('.fade.in'), 'tooltip should be toggled in')
+ })
+})