Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
add disable/enable/destroy test
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Feb 20, 2018
1 parent 80809dc commit 3bf0978
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ QUnit.test('ARIA attributes', function(assert) {
elem.editable().editableAriaShim();
assert.ok(elem.is('[role="button"]'), 'added role');
});

QUnit.test('Enable/disable/destroy', function(assert) {
elem.editable().editable('disable');
assert.strictEqual(elem.data('disabled.editable'), true);

elem.editable('enable');
assert.ok(elem.data('event.editable'));

elem.editable().editable('destroy');
assert.notOk(elem.data('event.editable'));
});

0 comments on commit 3bf0978

Please sign in to comment.