]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Must explicitly destroy tooltip in SVG unit test since its container is body. 14625/head
authorChris Rebert <code@rebertia.com>
Tue, 16 Sep 2014 03:01:04 +0000 (20:01 -0700)
committerChris Rebert <code@rebertia.com>
Tue, 16 Sep 2014 03:01:06 +0000 (20:01 -0700)
Leaking tooltips across tests leads to confusion and sadness.

js/tests/unit/tooltip.js

index b578704af4b7b4bf5389408af712f65fe6aef3d1..c75924e9ffad89d6da99a5bbf039128eaf714b6a 100644 (file)
@@ -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' })