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:
Vendored
+9
@@ -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')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user