Files
threshold-ui/addons/api/tests/unit/models/credential-library-test.js
T
Zhihe Li f0530e1f8f Vault SSH Cert Feature (#1596)
* feat: 🎸 Update models for vault ssh cert feature (#1591)

✅ Closes: ICU-7546

* feat: 🎸 Setup types in cred library forms and use HDS component (#1597)

* feat: 🎸 Setup types in cred library forms and use HDS component

✅ Closes: ICU-7673

* feat: 🎸 Add vault ssh cert type for credential library (#1608)

* feat: 🎸 Add vault ssh cert type for credential library

✅ Closes: ICU-7678

* feat: 🎸 Enable feature flag for vault ssh cert work (#1614)

* fix: 🐛 Change fields to optional as they get default by backend (#1615)

* Chore/cleanup vault ssh cert (#1616)
2023-02-01 13:46:23 -05:00

28 lines
900 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC } from 'api/models/credential-library';
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: TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC,
});
const modelB = store.createRecord('credential-library', {
type: 'unknown',
});
assert.false(modelA.isUnknown);
assert.true(modelB.isUnknown);
});
});