2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add unit tests for destroy behavior of popover and tooltip

This commit is contained in:
Jon Stevens
2012-06-18 19:51:49 -07:00
parent 6a974f9ff7
commit 47e0647086
2 changed files with 19 additions and 0 deletions
+9
View File
@@ -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')
})
})