From a7a9a1437914a86674c3fe9277484fcad21b08e8 Mon Sep 17 00:00:00 2001 From: fat Date: Wed, 17 Jul 2013 21:17:39 -0700 Subject: [PATCH] fix @muan's unit test ;) --- js/tests/unit/tooltip.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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') }) }) -- 2.47.2