Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Mar 28, 2017
1 parent c5f3382 commit 8ee8bbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/tests/unit/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,14 @@ $(function () {
})

QUnit.test('should not prevent event for input', function (assert) {
assert.expect(2)
assert.expect(3)
var done = assert.async()
var $target = $('<input type="checkbox" data-toggle="collapse" data-target="#collapsediv1" />').appendTo('#qunit-fixture')

$('<div id="collapsediv1"/>')
.appendTo('#qunit-fixture')
.on('shown.bs.collapse', function () {
.on('shown.bs.collapse', function (e) {
assert.ok(e.isDefaultPrevented() === false)
assert.ok($target.attr('aria-expanded') === 'true')
assert.ok($target.prop('checked'))
done()
Expand Down

0 comments on commit 8ee8bbe

Please sign in to comment.