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

25 lines
669 B
JavaScript
Raw Normal View History

2020-08-14 15:16:35 -04:00
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
2020-09-16 14:29:02 -04:00
module('Unit | Model | host', function (hooks) {
2020-08-14 15:16:35 -04:00
setupTest(hooks);
2020-09-16 14:29:02 -04:00
test('it exists', function (assert) {
assert.expect(1);
2020-08-14 15:16:35 -04:00
let store = this.owner.lookup('service:store');
let model = store.createRecord('host', {});
assert.ok(model);
});
2020-09-09 13:04:17 -04:00
2020-09-16 14:29:02 -04:00
test('it contains attributes', function (assert) {
assert.expect(1);
2020-09-09 13:04:17 -04:00
let store = this.owner.lookup('service:store');
let model = store.createRecord('host', {
type: 'static',
attributes: {
2020-09-16 14:29:02 -04:00
address: '127.0.0.1',
},
2020-09-09 13:04:17 -04:00
});
assert.equal(model.attributes.address, '127.0.0.1');
});
2020-08-14 15:16:35 -04:00
});