Files
threshold-ui/addons/api/tests/unit/models/credential-library-test.js
T
Zhihe Li b55c50cf64 Chore/update linter (#1355)
* chore: 🤖 Update editor config settings

* chore: 🤖 Add back ember-template-lint-plugin-prettier

* style: 💄 Format admin

* style: 💄 Format desktop

* style: 💄 Format rose

* style: 💄 Format core

* style: 💄 Format api
2022-10-06 11:41:12 -04:00

25 lines
772 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | credential library', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('credential-library', {});
assert.ok(model);
});
test('it has isUnknown property and returns the expected values', async function (assert) {
assert.expect(2);
const store = this.owner.lookup('service:store');
const modelA = store.createRecord('credential-library', { type: 'vault' });
const modelB = store.createRecord('credential-library', {
type: 'unknown',
});
assert.false(modelA.isUnknown);
assert.true(modelB.isUnknown);
});
});