refactor: 💡 Refactor ldap account view and serializer (#1826)
* refactor: 💡 Refactor ldap account view and serializer Refactor LDAP account view to only show `InfoField` fields if values are not `undefined`. Also fixed bug for updating accounts. ✅ Closes: ICU-10514 * refactor: 💡 clean up code Quick cleanup of code for accounts * Update account.js change text for commit * Update index.hbs * refactor: 💡 format hbs format hbs
This commit is contained in:
1 parent
de77f8807d
commit
e089d1c3ff
4 files changed
+50
-23
No files matched your search
@@ -32,7 +32,9 @@ module('Unit | Serializer | account', function (hooks) {
|
||||
const snapshot = record._createSnapshot();
|
||||
const serializedRecord = serializer.serialize(snapshot);
|
||||
assert.deepEqual(serializedRecord, {
|
||||
type: TYPE_AUTH_METHOD_OIDC,
|
||||
name: 'Name',
|
||||
auth_method_id: '1',
|
||||
description: 'Description',
|
||||
version: 1,
|
||||
attributes: {
|
||||
@@ -89,7 +91,9 @@ module('Unit | Serializer | account', function (hooks) {
|
||||
const snapshot = record._createSnapshot();
|
||||
const serializedRecord = serializer.serialize(snapshot);
|
||||
assert.deepEqual(serializedRecord, {
|
||||
type: TYPE_AUTH_METHOD_PASSWORD,
|
||||
name: 'Name',
|
||||
auth_method_id: '1',
|
||||
description: 'Description',
|
||||
attributes: {
|
||||
login_name: 'Login Name',
|
||||
@@ -116,7 +120,9 @@ module('Unit | Serializer | account', function (hooks) {
|
||||
};
|
||||
const serializedRecord = serializer.serialize(snapshot);
|
||||
assert.deepEqual(serializedRecord, {
|
||||
type: TYPE_AUTH_METHOD_PASSWORD,
|
||||
name: 'Name',
|
||||
auth_method_id: '1',
|
||||
description: 'Description',
|
||||
attributes: {
|
||||
login_name: 'Login Name',
|
||||
@@ -199,7 +205,9 @@ module('Unit | Serializer | account', function (hooks) {
|
||||
const snapshot = record._createSnapshot();
|
||||
const serializedRecord = serializer.serialize(snapshot);
|
||||
assert.deepEqual(serializedRecord, {
|
||||
type: TYPE_AUTH_METHOD_LDAP,
|
||||
name: 'Name',
|
||||
auth_method_id: '1',
|
||||
description: 'Description',
|
||||
version: 1,
|
||||
attributes: {
|
||||
|
||||
Reference in new issue
Block a user