diff options
| author | Jacob Thornton <[email protected]> | 2012-07-22 14:52:13 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-07-22 14:52:13 -0700 |
| commit | fa1e1e34dfd9e8501ffdbb92a282ff5550685f3c (patch) | |
| tree | 75ae5bf530b047f6a879105da74068fa3843229f /js/tests/unit/bootstrap-tooltip.js | |
| parent | fae6c36874b102408b53c6e5d980b247a9779dea (diff) | |
| parent | 48fc0ad56953f260b0f926f0fd7564e75cd9e9f9 (diff) | |
| download | bootstrap-fa1e1e34dfd9e8501ffdbb92a282ff5550685f3c.tar.xz bootstrap-fa1e1e34dfd9e8501ffdbb92a282ff5550685f3c.zip | |
Merge branch '2.1.0-wip' of https://github.com/twitter/bootstrap into 2.1.0-wip
Diffstat (limited to 'js/tests/unit/bootstrap-tooltip.js')
| -rw-r--r-- | js/tests/unit/bootstrap-tooltip.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js index 7852305c1..2eb8c8f7c 100644 --- a/js/tests/unit/bootstrap-tooltip.js +++ b/js/tests/unit/bootstrap-tooltip.js @@ -129,12 +129,16 @@ $(function () { }) test("should destroy tooltip", function () { - var tooltip = $('<div/>').tooltip() + var tooltip = $('<div/>').tooltip().on('click.foo', function(){}) ok(tooltip.data('tooltip'), 'tooltip has data') ok(tooltip.data('events').mouseover && tooltip.data('events').mouseout, 'tooltip has hover event') + ok(tooltip.data('events').click[0].namespace == 'foo', 'tooltip has extra click.foo event') + tooltip.tooltip('show') tooltip.tooltip('destroy') + ok(!tooltip.hasClass('in'), 'tooltip is hidden') ok(!tooltip.data('tooltip'), 'tooltip does not have data') - ok(!tooltip.data('events'), 'tooltip does not have any events') + ok(tooltip.data('events').click[0].namespace == 'foo', 'tooltip still has click.foo') + ok(!tooltip.data('events').mouseover && !tooltip.data('events').mouseout, 'tooltip does not have any events') }) }) |
