2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2018-05-22 15:03:45 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
import { run } from '@ember/runloop';
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
module('Unit | Serializer | intention', function (hooks) {
|
2018-05-22 15:03:45 +00:00
|
|
|
setupTest(hooks);
|
|
|
|
|
|
|
|
// Replace this with your real tests.
|
2022-09-15 08:43:17 +00:00
|
|
|
test('it exists', function (assert) {
|
2018-05-22 15:03:45 +00:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
let serializer = store.serializerFor('intention');
|
|
|
|
|
|
|
|
assert.ok(serializer);
|
|
|
|
});
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
test('it serializes records', function (assert) {
|
2018-05-22 15:03:45 +00:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
let record = run(() => store.createRecord('intention', {}));
|
|
|
|
|
|
|
|
let serializedRecord = record.serialize();
|
|
|
|
|
|
|
|
assert.ok(serializedRecord);
|
|
|
|
});
|
|
|
|
});
|