Files
threshold-ui/addons/api/tests/unit/models/credential-library-test.js
T
Dharini JeevaandCameron Perera 5224512da0 Icu 6153 unknown credential support (#1344)
* feat: 🎸 Add support for unknown credential types

✅ Closes: ICU-6153

* fix: 🐛 add unknown cred type

* refactor: 💡 move credential type logic to a component

* chore: 🤖 fix component name

* fix: 🐛 update component name, remove unused translated string

* fix: 🐛 file name

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2022-09-20 19:31:16 -05:00

23 lines
761 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);
});
});