diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index b1bf75e556..b2b004d6e6 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -294,15 +294,15 @@ $(function () { test("should add position class before positioning so that position-specific styles are taken into account", function(){ $("head").append('') - + var container = $("
").appendTo("body") , target = $('To my right') - .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') }) })