From: Nicklas Ansman Giertz Date: Fri, 6 Jan 2012 10:32:11 +0000 (+0100) Subject: Add a test case for issue #908 (twipsy doesn't respect custom classes) X-Git-Tag: v2.0.0~6^2~360^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=969fbe71504f6a8159688634cce774d7ffc7ac67;p=thirdparty%2Fbootstrap.git Add a test case for issue #908 (twipsy doesn't respect custom classes) The test case verifies that a custom class is respected. --- diff --git a/js/tests/unit/bootstrap-twipsy.js b/js/tests/unit/bootstrap-twipsy.js index 6623fc026e..08512ca979 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 = $('') + .appendTo('#qunit-fixture') + .twipsy({ template: '
'}) + .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