fix: normalize embedded scope IDs and ensure scope resources do not receive scope-prefixed URLs like other resources do
This commit is contained in:
4 files changed
+47
-12
No files matched your search
@@ -35,6 +35,16 @@ module('Unit | Adapter | application', function (hooks) {
|
||||
assert.equal(prefix, `v1/scopes/${scopeID}`);
|
||||
});
|
||||
|
||||
test('it does not prefixes URLs with `scopeID` for scope resources', function (assert) {
|
||||
assert.expect(1);
|
||||
const scopeID = 'global';
|
||||
const adapter = this.owner.lookup('adapter:application');
|
||||
const prefix = adapter.urlPrefix(null, null, 'scope', null, {
|
||||
adapterOptions: {scopeID}
|
||||
});
|
||||
assert.equal(prefix, `v1`);
|
||||
});
|
||||
|
||||
test('it generates correct default URL suffixes', function (assert) {
|
||||
assert.expect(1);
|
||||
const adapter = this.owner.lookup('adapter:application');
|
||||
|
||||
Reference in new issue
Block a user