]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix @muan's unit test ;)
authorfat <jacobthornton@gmail.com>
Thu, 18 Jul 2013 04:17:39 +0000 (21:17 -0700)
committerfat <jacobthornton@gmail.com>
Thu, 18 Jul 2013 04:17:39 +0000 (21:17 -0700)
js/tests/unit/tooltip.js

index b1bf75e55603cafb7932c79f3e37de857b4625a4..b2b004d6e68d8b7b39f75770058e89d48f91e7c7 100644 (file)
@@ -294,15 +294,15 @@ $(function () {
 
       test("should add position class before positioning so that position-specific styles are taken into account", function(){
         $("head").append('<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>')
-        
+
         var container = $("<div />").appendTo("body")
           , target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line">To my right</a>')
-          .appendTo(container)
-          .tooltip({placement: 'right'})
-          .tooltip('show')
+              .appendTo(container)
+              .tooltip({placement: 'right'})
+              .tooltip('show')
           , tooltip = container.find(".tooltip")
-        
-        ok( Math.round(target.offset().top + target[0].offsetHeight/2 - tooltip[0].offsetHeight/2) === tooltip.offset().top )
+
+        ok( Math.round(target.offset().top + target[0].offsetHeight/2 - tooltip[0].offsetHeight/2) === Math.round(tooltip.offset().top) )
         target.tooltip('hide')
       })
 })