assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title is set from title attribute while preferred over title option')
$tooltip.bootstrapTooltip('hide')
})
.one('hidden.bs.tooltip',function(){
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
done()
})
.bootstrapTooltip('show')
})
QUnit.test('should use title option',function(assert){
assert.expect(2)
vardone=assert.async()
var$tooltip=$('<a href="#" rel="tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({
title:'This is a tooltip with some content'
})
$tooltip
.one('shown.bs.tooltip',function(){
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'This is a tooltip with some content','title from title option is set')
$tooltip.bootstrapTooltip('hide')
})
.one('hidden.bs.tooltip',function(){
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
done()
})
.bootstrapTooltip('show')
})
QUnit.test('should not error when trying to show an top-placed tooltip that has been removed from the dom',function(assert){