From: Chris Rebert Date: Tue, 16 Sep 2014 03:01:04 +0000 (-0700) Subject: Must explicitly destroy tooltip in SVG unit test since its container is body. X-Git-Tag: v3.3.0~164^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14625%2Fhead;p=thirdparty%2Fbootstrap.git Must explicitly destroy tooltip in SVG unit test since its container is body. Leaking tooltips across tests leads to confusion and sadness. --- diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index b578704af4..c75924e9ff 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -768,6 +768,8 @@ $(function () { var offset = $('.tooltip').offset() $styles.remove() ok(Math.abs(offset.left - 88) <= 1, 'tooltip has correct horizontal location') + $circle.bootstrapTooltip('hide') + equal($('.tooltip').length, 0, 'tooltip removed from dom') start() }) .bootstrapTooltip({ container: 'body', placement: 'top', trigger: 'manual' })