aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-04-24 18:06:41 -0700
committerJacob Thornton <[email protected]>2012-04-24 18:06:41 -0700
commitaaabe2a46c64e7d9ffd5735dba2db4f3cf9906f5 (patch)
tree07316b209771d30a941adb0cb96d391413620336 /js/tests/unit
parent66ac6e14db39e552510bc6f033c06f59e68c27eb (diff)
downloadbootstrap-aaabe2a46c64e7d9ffd5735dba2db4f3cf9906f5.tar.xz
bootstrap-aaabe2a46c64e7d9ffd5735dba2db4f3cf9906f5.zip
fix regression in resetting collapse to auto on collapse open. (+ add spec and rebuild)v2.0.3
Diffstat (limited to 'js/tests/unit')
-rw-r--r--js/tests/unit/bootstrap-collapse.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-collapse.js b/js/tests/unit/bootstrap-collapse.js
index 8e52898b5..fb66135db 100644
--- a/js/tests/unit/bootstrap-collapse.js
+++ b/js/tests/unit/bootstrap-collapse.js
@@ -37,4 +37,18 @@ $(function () {
.collapse('show')
})
+ test("should reset style to auto after finishing opening collapse", function () {
+ $.support.transition = false
+ stop();
+ $('<div class="collapse" style="height: 0px"/>')
+ .bind('show', function () {
+ ok(this.style.height == '0px')
+ })
+ .bind('shown', function () {
+ ok(this.style.height == 'auto')
+ start()
+ })
+ .collapse('show')
+ })
+
}) \ No newline at end of file