fix: normalize embedded scope IDs and ensure scope resources do not receive scope-prefixed URLs like other resources do

This commit is contained in:
Randall Morey committed 2020-07-23 10:34:31 -04:00
1 parent c743cc1716
commit b7996f6271
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');