chore: 🤖 add organization and auth method models

This commit is contained in:
Randall Morey committed 2020-06-17 18:00:38 -04:00
1 parent e092ac54f6
commit 096d125f16
11 files changed
+137

No files matched your search

@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import config from 'ember-get-config';
module('Unit | Adapter | auth method', function (hooks) {
setupTest(hooks);
test('it generates URL prefixes without project scope', function (assert) {
assert.expect(1);
const service = this.owner.lookup('service:scope');
service.org = { id: 1 };
service.project = { id: 2 };
const adapter = this.owner.lookup('adapter:auth-method');
assert.equal(adapter.urlPrefix(), `${config.api.namespace}/orgs/1`);
});
});