Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/bootstrap-tooltip.js')
-rw-r--r--js/tests/unit/bootstrap-tooltip.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js
index 51e03486e6..7852305c1e 100644
--- a/js/tests/unit/bootstrap-tooltip.js
+++ b/js/tests/unit/bootstrap-tooltip.js
@@ -128,4 +128,13 @@ $(function () {
}, 200)
})
+ test("should destroy tooltip", function () {
+ var tooltip = $('<div/>').tooltip()
+ ok(tooltip.data('tooltip'), 'tooltip has data')
+ ok(tooltip.data('events').mouseover && tooltip.data('events').mouseout, 'tooltip has hover event')
+ tooltip.tooltip('destroy')
+ ok(!tooltip.data('tooltip'), 'tooltip does not have data')
+ ok(!tooltip.data('events'), 'tooltip does not have any events')
+ })
+
})