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

27 lines
823 B
JavaScript
Raw Normal View History

/**
2026-01-28 17:09:06 -08:00
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
2023-03-16 13:49:04 -04:00
module('Unit | Model | connection-recording', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
2023-03-16 13:49:04 -04:00
let model = store.createRecord('connection-recording', {});
assert.ok(model);
});
test('it has channels as a relationship', async function (assert) {
const store = this.owner.lookup('service:store');
2023-03-16 13:49:04 -04:00
const model = store.createRecord('connection-recording', {
channel_recordings: [store.createRecord('channel-recording')],
});
2023-03-16 13:49:04 -04:00
const channel_recordings = await model.channel_recordings;
assert.strictEqual(channel_recordings.length, 1);
});
});