aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicklas Ansman Giertz <[email protected]>2012-01-06 11:32:11 +0100
committerNicklas Ansman Giertz <[email protected]>2012-01-06 11:33:18 +0100
commit969fbe71504f6a8159688634cce774d7ffc7ac67 (patch)
tree7be936f85257f981c2fcabbc6147d296fcc22a02
parentf07bcafd397dd39c5490e192ab7b52c49acd3d9b (diff)
downloadbootstrap-969fbe71504f6a8159688634cce774d7ffc7ac67.tar.xz
bootstrap-969fbe71504f6a8159688634cce774d7ffc7ac67.zip
Add a test case for issue #908 (twipsy doesn't respect custom classes)
The test case verifies that a custom class is respected.
-rw-r--r--js/tests/unit/bootstrap-twipsy.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-twipsy.js b/js/tests/unit/bootstrap-twipsy.js
index 6623fc026..08512ca97 100644
--- a/js/tests/unit/bootstrap-twipsy.js
+++ b/js/tests/unit/bootstrap-twipsy.js
@@ -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')
+ })
+
}) \ No newline at end of file