aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorfat <[email protected]>2013-08-17 14:24:38 -0700
committerfat <[email protected]>2013-08-17 14:24:38 -0700
commit712b89ed4ebe71e44f2a7081be7ba372d8ca3f42 (patch)
treef0a86f3d11841bedee5f120263b1d3c9cdd1e547 /js/tests
parent728a5e17d667422cdad791e06375e8e9a0f80cc1 (diff)
downloadbootstrap-712b89ed4ebe71e44f2a7081be7ba372d8ca3f42.tar.xz
bootstrap-712b89ed4ebe71e44f2a7081be7ba372d8ca3f42.zip
fixes #9362
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/modal.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js
index 2c610d83d..5755d2751 100644
--- a/js/tests/unit/modal.js
+++ b/js/tests/unit/modal.js
@@ -174,4 +174,23 @@ $(function () {
})
.modal("show")
})
+
+ test("should close reopened modal with [data-dismiss=modal] click", function () {
+ stop()
+ $.support.transition = false
+ var div = $("<div id='modal-test'><div class='contents'><div id='close' data-dismiss='modal'></div></div></div>")
+ div
+ .bind("shown.bs.modal", function () {
+ $('#close').click()
+ ok(!$('#modal-test').is(":visible"), 'modal hidden')
+ })
+ .one("hidden.bs.modal", function() {
+ div.one('hidden.bs.modal', function () {
+ start()
+ }).modal("show")
+ })
+ .modal("show")
+
+ div.remove()
+ })
})