feature: add account set-password ability

This commit is contained in:
Randall Morey committed 2021-09-29 17:47:48 -04:00
1 parent 021be5d689
commit cfa6c42506
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));
});
});