Files
threshold-ui/addons/api/tests/unit/models/host-catalog-test.js
T
Carlos Alcaide Corvo 6c2694999c feat: 🎸 Host catalogs only supports host type static
Host Catalogs will just show the hosts with type: static
2021-12-14 08:08:15 -08:00

23 lines
786 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | host catalog', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
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);
});
});