From 934d1bcae588a278900018abb648242eb05328b3 Mon Sep 17 00:00:00 2001 From: Nathan Muir Date: Tue, 3 Sep 2013 12:23:51 +1000 Subject: [PATCH] Add unit test for #9920 Merges #10385 --- js/tests/unit/button.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 16284e0ced..115edefafd 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') }) }) -- 2.47.2