chore: 🤖 rename application_credentials_sources_ids to brokered (#1255)
This commit is contained in:
1 parent
39c0835a99
commit
e3324ad64a
9 files changed
+37
-36
No files matched your search
@@ -239,15 +239,15 @@ module('Unit | Model | target', function (hooks) {
|
||||
id: '123abc',
|
||||
type: 'target',
|
||||
attributes: {
|
||||
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
brokered_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
},
|
||||
},
|
||||
});
|
||||
const target = store.peekRecord('target', '123abc');
|
||||
assert.strictEqual(
|
||||
target.application_credential_source_ids.length,
|
||||
target.brokered_credential_source_ids.length,
|
||||
2,
|
||||
'Target has two entires in application_credential_source_ids'
|
||||
'Target has two entires in brokered_credential_source_ids'
|
||||
);
|
||||
assert.strictEqual(
|
||||
target.credentialSources.length,
|
||||
@@ -268,17 +268,17 @@ module('Unit | Model | target', function (hooks) {
|
||||
attributes: {},
|
||||
},
|
||||
});
|
||||
// Since `credentialSources` is computed on `application_credential_source_ids`,
|
||||
// Since `credentialSources` is computed on `brokered_credential_source_ids`,
|
||||
// not the store itself, it's necessary to do this assignment to kick-off the
|
||||
// computed update.
|
||||
/* eslint-disable no-self-assign */
|
||||
target.application_credential_source_ids =
|
||||
target.application_credential_source_ids;
|
||||
target.brokered_credential_source_ids =
|
||||
target.brokered_credential_source_ids;
|
||||
/* eslint-enable no-self-assign */
|
||||
assert.strictEqual(
|
||||
target.application_credential_source_ids.length,
|
||||
target.brokered_credential_source_ids.length,
|
||||
2,
|
||||
'Target has two entires in application_credential_source_ids'
|
||||
'Target has two entires in brokered_credential_source_ids'
|
||||
);
|
||||
assert.strictEqual(
|
||||
target.credentialSources.length,
|
||||
@@ -294,7 +294,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
(schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
application_credential_source_ids: ['123_abc', 'foobar'],
|
||||
brokered_credential_source_ids: ['123_abc', 'foobar'],
|
||||
version: 1,
|
||||
});
|
||||
return { id: '123abc' };
|
||||
@@ -308,7 +308,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
attributes: {
|
||||
name: 'Target',
|
||||
description: 'Description',
|
||||
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
brokered_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
version: 1,
|
||||
scope: {
|
||||
scope_id: 'o_1',
|
||||
@@ -328,7 +328,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
(schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
application_credential_source_ids: ['1', '2'],
|
||||
brokered_credential_source_ids: ['1', '2'],
|
||||
version: 1,
|
||||
});
|
||||
return { id: '123abc' };
|
||||
@@ -342,7 +342,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
attributes: {
|
||||
name: 'Target',
|
||||
description: 'Description',
|
||||
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
brokered_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
version: 1,
|
||||
scope: {
|
||||
scope_id: 'o_1',
|
||||
@@ -362,7 +362,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
(schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
application_credential_source_ids: ['2'],
|
||||
brokered_credential_source_ids: ['2'],
|
||||
version: 1,
|
||||
});
|
||||
return { id: '123abc' };
|
||||
@@ -376,7 +376,7 @@ module('Unit | Model | target', function (hooks) {
|
||||
attributes: {
|
||||
name: 'Target',
|
||||
description: 'Description',
|
||||
application_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
brokered_credential_source_ids: [{ value: '1' }, { value: '2' }],
|
||||
version: 1,
|
||||
scope: {
|
||||
scope_id: 'o_1',
|
||||
|
||||
Reference in new issue
Block a user