Revert "chore: 🤖 bump ember-can (#3093)" (#3107)

This reverts commit b5d33948dc.
This commit is contained in:
hashicc authored and GitHub committed 2025-12-08 18:20:55 -05:00
1 parent 9204c63b17
commit f1ffb80b80
107 files changed
+435 -542

No files matched your search

@@ -9,7 +9,7 @@ import { setupTest } from 'ember-qunit';
module('Unit | Abilities | Worker', function (hooks) {
setupTest(hooks);
let abilitiesService;
let canService;
let store;
const instances = {
@@ -17,7 +17,7 @@ module('Unit | Abilities | Worker', function (hooks) {
};
hooks.beforeEach(function () {
abilitiesService = this.owner.lookup('service:abilities');
canService = this.owner.lookup('service:can');
store = this.owner.lookup('service:store');
instances.worker = store.createRecord('worker');
});
@@ -27,7 +27,7 @@ module('Unit | Abilities | Worker', function (hooks) {
authorized_collection_actions: { workers: ['create:worker-led'] },
};
assert.true(
abilitiesService.can('createWorkerLed worker', model, {
canService.can('createWorkerLed worker', model, {
collection: 'workers',
}),
);
@@ -38,7 +38,7 @@ module('Unit | Abilities | Worker', function (hooks) {
authorized_collection_actions: { workers: [] },
};
assert.true(
abilitiesService.cannot('createWorkerLed worker', model, {
canService.cannot('createWorkerLed worker', model, {
collection: 'workers',
}),
);
@@ -46,13 +46,11 @@ module('Unit | Abilities | Worker', function (hooks) {
test('can set worker tags', function (assert) {
instances.worker.authorized_actions = ['set-worker-tags'];
assert.true(abilitiesService.can('setWorkerTags worker', instances.worker));
assert.true(canService.can('setWorkerTags worker', instances.worker));
});
test('cannot set worker tags', function (assert) {
instances.worker.authorized_actions = [];
assert.true(
abilitiesService.cannot('setWorkerTags worker', instances.worker),
);
assert.true(canService.cannot('setWorkerTags worker', instances.worker));
});
});