Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfat <jacobthornton@gmail.com>2013-07-18 08:17:39 +0400
committerfat <jacobthornton@gmail.com>2013-07-18 08:17:39 +0400
commita7a9a1437914a86674c3fe9277484fcad21b08e8 (patch)
tree70ea6128090f5e026807c917ab126902a433451c /js/tests/unit/tooltip.js
parent102df4ff3334663b20c8730bbb32a673b4259edf (diff)
fix @muan's unit test ;)
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r--js/tests/unit/tooltip.js12
1 files 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('<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')
})
})