refactor: 💡 implement new pathing for groups
This commit is contained in:
17 files changed
+75
-36
No files matched your search
@@ -93,13 +93,11 @@ module('Unit | Adapter | application', function (hooks) {
|
||||
test('it can request records through the store from a specified scope', async function (assert) {
|
||||
assert.expect(1);
|
||||
const store = this.owner.lookup('service:store');
|
||||
this.server.get('/v1/scopes/p_456/groups', () => {
|
||||
assert.ok(true, 'Scoped resource URL was requested.');
|
||||
this.server.get('/v1/groups', (_, { queryParams: { scope_id }}) => {
|
||||
assert.equal(scope_id, 'p_456', 'Scoped resource URL was requested.');
|
||||
return {items: []};
|
||||
});
|
||||
await store.findAll('group', {
|
||||
adapterOptions: { scopeID: 'p_456' }
|
||||
});
|
||||
await store.query('group', { scope_id: 'p_456' });
|
||||
});
|
||||
|
||||
test('it rewrites PUT to PATCH, but leaves others unchanged', function (assert) {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Adapter | group', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let adapter = this.owner.lookup('adapter:group');
|
||||
assert.ok(adapter);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user