2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2018-10-19 15:17:02 +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 | token', function (hooks) {
|
2018-10-19 15:17:02 +00:00
|
|
|
setupTest(hooks);
|
|
|
|
|
|
|
|
// Replace this with your real tests.
|
2022-09-15 08:43:17 +00:00
|
|
|
test('it exists', function (assert) {
|
2018-10-19 15:17:02 +00:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
let serializer = store.serializerFor('token');
|
|
|
|
|
|
|
|
assert.ok(serializer);
|
|
|
|
});
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
test('it serializes records', function (assert) {
|
2018-10-19 15:17:02 +00:00
|
|
|
let store = this.owner.lookup('service:store');
|
|
|
|
let record = run(() => store.createRecord('token', {}));
|
|
|
|
|
|
|
|
let serializedRecord = record.serialize();
|
|
|
|
|
|
|
|
assert.ok(serializedRecord);
|
|
|
|
});
|
|
|
|
});
|