Icu 6657 auth method model fragments refactor (#1507)
* refactor: 💡 Remove fragment usage for arrays in auth method * chore: 🤖 Remove ember-data-model-fragments ✅ Closes: ICU-6657
This commit is contained in:
1 parent
f8429b15e9
commit
c3d9fd8fc5
32 files changed
+161
-341
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Transform | account claim map array', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it deserializes an array of account claims', function (assert) {
|
||||
assert.expect(1);
|
||||
const transform = this.owner.lookup('transform:account-claim-map-array');
|
||||
const deserialized = transform.deserialize(['oid=sub', 'full_name=name']);
|
||||
assert.deepEqual(deserialized, [
|
||||
{ from: 'oid', to: 'sub' },
|
||||
{ from: 'full_name', to: 'name' },
|
||||
]);
|
||||
});
|
||||
|
||||
test('it serializes an array of account claims', function (assert) {
|
||||
assert.expect(1);
|
||||
const transform = this.owner.lookup('transform:account-claim-map-array');
|
||||
const serialized = transform.serialize([
|
||||
{ from: 'oid', to: 'sub' },
|
||||
{ from: 'full_name', to: 'name' },
|
||||
]);
|
||||
assert.deepEqual(serialized, ['oid=sub', 'full_name=name']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user