Files
threshold-ui/addons/api/tests/unit/models/host-catalog-test.js
T

22 lines
786 B
JavaScript
Raw Normal View History

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);
});
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
});