feature: add account set-password ability
This commit is contained in:
5 files changed
+35
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Abilities | Account', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it reflects when a given account may set password based on authorized_actions', function (assert) {
|
||||
assert.expect(2);
|
||||
const service = this.owner.lookup('service:can');
|
||||
const model = {
|
||||
authorized_actions: ['set-password'],
|
||||
};
|
||||
assert.ok(service.can('setPassword target', model));
|
||||
model.authorized_actions = [];
|
||||
assert.notOk(service.can('setPassword target', model));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user