aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/modal.js
diff options
context:
space:
mode:
authorfat <[email protected]>2014-01-16 13:33:09 -0800
committerfat <[email protected]>2014-01-16 13:33:09 -0800
commit2f76821a4dce7683168ab190e53c64fdf13dd469 (patch)
tree7fb60babcf89856fae934ea30067d13f6e3b1b1f /js/tests/unit/modal.js
parentbc074d54883de361f98429ab39b004ea89f3557a (diff)
downloadbootstrap-2f76821a4dce7683168ab190e53c64fdf13dd469.tar.xz
bootstrap-2f76821a4dce7683168ab190e53c64fdf13dd469.zip
new qunit
Diffstat (limited to 'js/tests/unit/modal.js')
-rw-r--r--js/tests/unit/modal.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js
index 6b2074327..281978142 100644
--- a/js/tests/unit/modal.js
+++ b/js/tests/unit/modal.js
@@ -157,16 +157,15 @@ $(function () {
test('should trigger hide event once when clicking outside of modal-content', function () {
stop()
$.support.transition = false
- var div = $('<div id="modal-test"><div class="contents"></div></div>')
+
var triggered
+ var div = $('<div id="modal-test"><div class="contents"></div></div>')
+
div
.bind('shown.bs.modal', function () {
triggered = 0
$('#modal-test').click()
})
- .one('hidden.bs.modal', function () {
- div.modal('show')
- })
.bind('hide.bs.modal', function () {
triggered += 1
ok(triggered === 1, 'modal hide triggered once')