diff options
| author | Johann-S <[email protected]> | 2015-03-24 20:47:35 +0100 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2015-04-08 13:10:53 +0200 |
| commit | 3d71eae3011b10daa558baf494b019925fee5f60 (patch) | |
| tree | e9388b7449a5ee14649c2640f172e1430a0ddef6 /js/tests/unit/tooltip.js | |
| parent | d37bc2ae651a4fc2fd4ca477ab5bdfaeba5aafde (diff) | |
| download | bootstrap-3d71eae3011b10daa558baf494b019925fee5f60.tar.xz bootstrap-3d71eae3011b10daa558baf494b019925fee5f60.zip | |
Add event after template inserted
Diffstat (limited to 'js/tests/unit/tooltip.js')
| -rw-r--r-- | js/tests/unit/tooltip.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 57a59db18..8086631c8 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -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() |
