2020-06-04 16:32:16 -04:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
|
|
2020-09-16 14:29:02 -04:00
|
|
|
module('Unit | Model | host catalog', function (hooks) {
|
2020-06-04 16:32:16 -04:00
|
|
|
setupTest(hooks);
|
|
|
|
|
|
2020-09-16 14:29:02 -04:00
|
|
|
test('it exists', function (assert) {
|
2020-06-04 16:32:16 -04:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
|
let model = store.createRecord('host-catalog', {});
|
|
|
|
|
assert.ok(model);
|
|
|
|
|
});
|
2021-12-06 15:00:48 -08:00
|
|
|
|
|
|
|
|
test('it has isStatic function and returns the expected values', async function (assert) {
|
|
|
|
|
assert.expect(3);
|
|
|
|
|
const store = this.owner.lookup('service:store');
|
|
|
|
|
const modelA = store.createRecord('host-catalog', { type: 'static' });
|
|
|
|
|
const modelB = store.createRecord('host-catalog', { type: 'plugin' });
|
|
|
|
|
assert.equal(typeof modelA.isStatic, 'boolean');
|
|
|
|
|
assert.true(modelA.isStatic);
|
|
|
|
|
assert.false(modelB.isStatic);
|
|
|
|
|
});
|
2020-06-04 16:32:16 -04:00
|
|
|
});
|