aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-01 20:27:30 -0800
committerMark Otto <[email protected]>2013-12-01 20:27:30 -0800
commit4876cbeef8c79686ba31c3ed22771357d71dbe51 (patch)
tree79fed0fbb2a96fad2247c3014a045e655d1a825e /js/tests
parent1444a3ca638bd8661c0019560117ac75aace3402 (diff)
parent561aff7942d9adfc9508232789e2598406f80934 (diff)
downloadbootstrap-4876cbeef8c79686ba31c3ed22771357d71dbe51.tar.xz
bootstrap-4876cbeef8c79686ba31c3ed22771357d71dbe51.zip
Merge branch 'master' into pr/11412
Conflicts: dist/js/bootstrap.min.js
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')
})
})