diff options
Diffstat (limited to 'js/tests/unit/bootstrap-popover.js')
-rw-r--r-- | js/tests/unit/bootstrap-popover.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/tests/unit/bootstrap-popover.js b/js/tests/unit/bootstrap-popover.js index 6d5d9f7a18..daffe215c9 100644 --- a/js/tests/unit/bootstrap-popover.js +++ b/js/tests/unit/bootstrap-popover.js @@ -92,12 +92,16 @@ $(function () { }) test("should destroy popover", function () { - var popover = $('<div/>').popover() + var popover = $('<div/>').popover().on('click.foo', function(){}) ok(popover.data('popover'), 'popover has data') ok(popover.data('events').mouseover && popover.data('events').mouseout, 'popover has hover event') + ok(popover.data('events').click[0].namespace == 'foo', 'popover has extra click.foo event') + popover.popover('show') popover.popover('destroy') + ok(!popover.hasClass('in'), 'popover is hidden') ok(!popover.data('popover'), 'popover does not have data') - ok(!popover.data('events'), 'popover does not have any events') + ok(popover.data('events').click[0].namespace == 'foo', 'popover still has click.foo') + ok(!popover.data('events').mouseover && !popover.data('events').mouseout, 'popover does not have any events') }) })
\ No newline at end of file |