2020-09-21 18:23:32 -04:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
|
|
2021-03-04 15:47:38 -05:00
|
|
|
module('Unit | Serializer | host', function (hooks) {
|
2020-09-21 18:23:32 -04:00
|
|
|
setupTest(hooks);
|
|
|
|
|
|
2021-03-04 15:47:38 -05:00
|
|
|
test('it exists', function (assert) {
|
2020-09-21 18:23:32 -04:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
|
let serializer = store.serializerFor('host');
|
|
|
|
|
|
|
|
|
|
assert.ok(serializer);
|
|
|
|
|
});
|
|
|
|
|
|
2021-03-04 15:47:38 -05:00
|
|
|
test('it serializes records', function (assert) {
|
2020-09-21 18:23:32 -04:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
|
let record = store.createRecord('host', {});
|
|
|
|
|
|
|
|
|
|
let serializedRecord = record.serialize();
|
|
|
|
|
|
|
|
|
|
assert.ok(serializedRecord);
|
|
|
|
|
});
|
|
|
|
|
});
|