aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2013-11-10 17:33:12 -0800
committerChris Rebert <[email protected]>2013-11-10 17:33:12 -0800
commite7d6af003e6af02c26cc8864da72dc807f8f97a1 (patch)
tree61bc32a87d9439acdcf2b6bc2dd049b566f645ce /js/tests
parenta639c6e1cf2eb0457be84290f7848c3eb9eaad27 (diff)
parent7a3f41b11b15f4b931aa43cf1a2fd7a00db6f817 (diff)
downloadbootstrap-e7d6af003e6af02c26cc8864da72dc807f8f97a1.tar.xz
bootstrap-e7d6af003e6af02c26cc8864da72dc807f8f97a1.zip
Merge pull request #11376 from twbs/double-click-radio-fix
Double-clicking on a .btn-ized radio button shouldn't de-select it
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/button.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js
index 16284e0ce..115edefaf 100644
--- a/js/tests/unit/button.js
+++ b/js/tests/unit/button.js
@@ -111,6 +111,12 @@ $(function () {
ok(!btn1.find('input').prop('checked'), 'btn1 is checked')
ok(btn2.hasClass('active'), 'btn2 has active class')
ok(btn2.find('input').prop('checked'), 'btn2 is checked')
+
+ btn2.find('input').click() /* clicking an already checked radio should not un-check it */
+ ok(!btn1.hasClass('active'), 'btn1 does not have active class')
+ ok(!btn1.find('input').prop('checked'), 'btn1 is checked')
+ ok(btn2.hasClass('active'), 'btn2 has active class')
+ ok(btn2.find('input').prop('checked'), 'btn2 is checked')
})
})