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:
authorJohann-S <johann.servoire@gmail.com>2017-03-31 11:03:54 +0300
committerGitHub <noreply@github.com>2017-03-31 11:03:54 +0300
commit5142de7e592abc0a791ea3465616795c91219bcc (patch)
treee5a890c94467b74957dbd64cf19f8c86e36c47f7 /js/tests/unit/tooltip.js
parentcb4bc89fdf0286e9b88b6d5be6148b9b53463ff8 (diff)
Popover + Tooltip - fix error when content or title is a number
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r--js/tests/unit/tooltip.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index e739f06a50..8cb1a6fdf1 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -886,4 +886,20 @@ $(function () {
$el.bootstrapTooltip('hide')
})
+
+ QUnit.test('should convert number in title to string', function (assert) {
+ assert.expect(1)
+ var done = assert.async()
+ var $el = $('<a href="#" rel="tooltip" title="7"/>')
+ .appendTo('#qunit-fixture')
+ .bootstrapTooltip('show')
+ .on('shown.bs.tooltip', function () {
+ var tooltip = $el.data('bs.tooltip')
+ var $tooltip = $(tooltip.getTipElement())
+ assert.strictEqual($tooltip.children().text(), '7')
+ done()
+ })
+
+ $el.bootstrapTooltip('show')
+ })
})