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)
This commit is contained in:
1 parent
e3772352ea
commit
f0530e1f8f
34 files changed
+1421
-182
No files matched your search
@@ -0,0 +1,52 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Transform | object as array', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it deserializes an object to an array of key value objects', function (assert) {
|
||||
assert.expect(1);
|
||||
let transform = this.owner.lookup('transform:object-as-array');
|
||||
const deserialized = transform.deserialize({
|
||||
first: 'Hey',
|
||||
second: 'There',
|
||||
third: 'Everyone',
|
||||
});
|
||||
assert.deepEqual(deserialized, [
|
||||
{ key: 'first', value: 'Hey' },
|
||||
{ key: 'second', value: 'There' },
|
||||
{ key: 'third', value: 'Everyone' },
|
||||
]);
|
||||
});
|
||||
|
||||
test('it deserializes undefined to an empty object', function (assert) {
|
||||
assert.expect(1);
|
||||
let transform = this.owner.lookup('transform:object-as-array');
|
||||
const deserialized = transform.deserialize(undefined);
|
||||
assert.deepEqual(deserialized, []);
|
||||
});
|
||||
|
||||
test('it serializes an array of key value objects to an object', function (assert) {
|
||||
assert.expect(1);
|
||||
let transform = this.owner.lookup('transform:object-as-array');
|
||||
const serialized = transform.serialize([
|
||||
{ key: 'first', value: 'Hey' },
|
||||
{ key: 'second', value: 'There' },
|
||||
{ key: 'third', value: 'Everyone' },
|
||||
]);
|
||||
|
||||
assert.deepEqual(serialized, {
|
||||
first: 'Hey',
|
||||
second: 'There',
|
||||
third: 'Everyone',
|
||||
});
|
||||
});
|
||||
|
||||
test('it serializes an empty array of key value objects to null', function (assert) {
|
||||
assert.expect(1);
|
||||
let transform = this.owner.lookup('transform:object-as-array');
|
||||
const serialized = transform.serialize([]);
|
||||
|
||||
assert.deepEqual(serialized, null);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user