Skip to content

Commit

Permalink
Round unit tests using offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmartel committed Jan 5, 2015
1 parent bc9a3ad commit 388064a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/tests/unit/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ $(function () {

$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
var $initialTop = $tooltip.offset().top
var $initialTop = Math.round($tooltip.offset().top)

$target.bootstrapTooltip('hide')

Expand All @@ -737,7 +737,7 @@ $(function () {
$target.bootstrapTooltip('show')
$tooltip = $container.find('.tooltip')

equal($tooltip.offset().top, $initialTop, 'position is the same after scrolling')
equal(Math.round($tooltip.offset().top), $initialTop, 'position is the same after scrolling')
equal($(document).scrollTop(), 2000, 'document scrolled')

$target.bootstrapTooltip('hide')
Expand Down

0 comments on commit 388064a

Please sign in to comment.