Files
threshold-ui/addons/api/tests/unit/adapters/group-test.js
T
Susmitha Girumala d688f55d71 chore: 🤖 Update groups breadcrumbs after refresh from develop
Update form errors in ui/core to use model errors object
2020-06-29 10:38:02 -04:00

22 lines
672 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import config from 'ember-get-config';
module('Unit | Adapter | group', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let adapter = this.owner.lookup('adapter:group');
assert.ok(adapter);
});
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:group');
assert.equal(adapter.urlPrefix(), `${config.api.namespace}/orgs/1`);
});
});