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:
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')
+ })
})