1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 12:59:05 +02:00

Add event after template inserted

This commit is contained in:
Johann-S
2015-03-24 20:47:35 +01:00
parent d37bc2ae65
commit 3d71eae301
5 changed files with 40 additions and 0 deletions

View File

@@ -139,6 +139,20 @@ $(function () {
.bootstrapTooltip('show')
})
QUnit.test('should fire inserted event', function (assert) {
assert.expect(2)
var done = assert.async()
$('<div title="tooltip title"/>')
.appendTo('#qunit-fixture')
.on('inserted.bs.tooltip', function () {
assert.notEqual($('.tooltip').length, 0, 'tooltip was inserted')
assert.ok(true, 'inserted event fired')
done()
})
.bootstrapTooltip('show')
})
QUnit.test('should fire shown event', function (assert) {
assert.expect(1)
var done = assert.async()