Skip to content

Commit

Permalink
Fix existing radio button unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke committed Apr 11, 2015
1 parent 1b9baa0 commit 66d7113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/tests/unit/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ $(function () {
assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked')
$btn2.find('input').trigger('click')
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked')
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')

$btn2.find('input').trigger('click') // clicking an already checked radio should not un-check it
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked')
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
})
Expand Down

0 comments on commit 66d7113

Please sign in to comment.