0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Add testcase to popover

This test case verifies that custom classes are respected.
This commit is contained in:
Nicklas Ansman Giertz 2012-01-22 12:32:37 +01:00
parent 6a9f169fd6
commit 05fdd43e41

View File

@ -70,5 +70,24 @@ $(function () {
ok(!$('.popover').length, 'popover was removed')
$('#qunit-fixture').empty()
})
test("should respect custom classes", function() {
$.support.transition = false
var popover = $('<a href="#">@fat</a>')
.appendTo('#qunit-fixture')
.popover({
title: 'Test'
, content: 'Test'
, template: '<div class="popover foobar"><div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div></div>'
})
popover.popover('show')
console.log(popover)
ok($('.popover').length, 'popover was inserted')
ok($('.popover').hasClass('foobar'), 'custom class is present')
popover.popover('hide')
ok(!$('.popover').length, 'popover was removed')
$('#qunit-fixture').empty()
})
})