2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Popover + Tooltip - fix error when content or title is a number

This commit is contained in:
Johann-S
2017-03-31 10:03:54 +02:00
committed by GitHub
parent cb4bc89fdf
commit 5142de7e59
3 changed files with 42 additions and 0 deletions
+18
View File
@@ -364,4 +364,22 @@ $(function () {
})
.modal('show')
})
QUnit.test('should convert number to string without error for content and title', function (assert) {
assert.expect(2)
var done = assert.async()
var $popover = $('<a href="#">@mdo</a>')
.appendTo('#qunit-fixture')
.bootstrapPopover({
title: 5,
content: 7
})
.on('shown.bs.popover', function () {
assert.strictEqual($('.popover .popover-title').text(), '5')
assert.strictEqual($('.popover .popover-content').text(), '7')
done()
})
$popover.bootstrapPopover('show')
})
})