Removed event handlers after JavaScript tests complete.
Fixes error "Assertion occurred after test had finished" with newer versions of QUnit.
This commit is contained in:
parent
25d450c852
commit
48d50dd53f
|
@ -47,6 +47,7 @@ QUnit.test('add/remove form events', function(assert) {
|
|||
assert.ok(true, 'event `formset:added` triggered');
|
||||
assert.equal(true, $row.is('#first-1'));
|
||||
assert.equal(formsetName, 'first');
|
||||
$document.off('formset:added');
|
||||
});
|
||||
addButton.click();
|
||||
var deletedRow = $('#first-1');
|
||||
|
@ -55,6 +56,7 @@ QUnit.test('add/remove form events', function(assert) {
|
|||
assert.ok(true, 'event `formset:removed` triggered');
|
||||
assert.equal(true, $row.is(deletedRow));
|
||||
assert.equal(formsetName, 'first');
|
||||
$document.off('formset:removed');
|
||||
});
|
||||
deleteLink.trigger($.Event('click', {target: deleteLink}));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue