mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Add a test case for issue #908 (twipsy doesn't respect custom classes)
The test case verifies that a custom class is respected.
This commit is contained in:
parent
f07bcafd39
commit
969fbe7150
11
js/tests/unit/bootstrap-twipsy.js
vendored
11
js/tests/unit/bootstrap-twipsy.js
vendored
@ -48,4 +48,15 @@ $(function () {
|
||||
ok(!$(".twipsy").length, 'twipsy removed')
|
||||
})
|
||||
|
||||
test("should respect custom classes", function () {
|
||||
var twipsy = $('<a href="#" rel="twipsy" title="Another twipsy"></a>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.twipsy({ template: '<div class="twipsy some-class"><div class="twipsy-arrow"/><div class="twipsy-inner"/></div>'})
|
||||
.twipsy('show')
|
||||
|
||||
ok($('.twipsy').hasClass('some-class'), 'custom class is present')
|
||||
twipsy.twipsy('hide')
|
||||
ok(!$(".twipsy").length, 'twipsy removed')
|
||||
})
|
||||
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user