import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import { MIME_TYPE_ASCIICAST } from 'api/models/channel-recording'; module('Unit | Model | channel-recording', function (hooks) { setupTest(hooks); test('it exists', function (assert) { let store = this.owner.lookup('service:store'); let model = store.createRecord('channel-recording', {}); assert.ok(model); }); test('it has isAsciicast property and returns the expected values', async function (assert) { assert.expect(2); const store = this.owner.lookup('service:store'); const modelA = store.createRecord('channel-recording', { mime_types: [MIME_TYPE_ASCIICAST], }); const modelB = store.createRecord('channel-recording', { mime_types: ['random'], }); assert.true(modelA.isAsciicast); assert.false(modelB.isAsciicast); }); });