Skip to content

Commit

Permalink
#139: fix tests for renamed c__xxx fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Mar 22, 2023
1 parent 36bcfbe commit 05e7d96
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lib/metadataTypes/definitions/User.definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
typeDescription: 'Marketing Cloud users',
typeName: 'User',
typeRetrieveByDefault: false,
stringifyFieldsBeforeTemplate: ['DefaultBusinessUnit', 'AssociatedBusinessUnits__c'],
stringifyFieldsBeforeTemplate: ['DefaultBusinessUnit', 'c__AssociatedBusinessUnits'],
fields: {
AccountUserID: {
isCreateable: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"NotificationEmailAddress": "user_test@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": 9999999,
"type__c": "User",
"AssociatedBusinessUnits__c": [9999999],
"RoleNamesGlobal__c": [
"c__type": "User",
"c__AssociatedBusinessUnits": [9999999],
"c__RoleNamesGlobal": [
"Administrator",
"Distributed Sending User",
"Individual role for 700301950",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"NotificationEmailAddress": "testNew_user@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": 1111111,
"type__c": "User",
"AssociatedBusinessUnits__c": [1111111, 9999999],
"RoleNamesGlobal__c": [
"c__type": "User",
"c__AssociatedBusinessUnits": [1111111, 9999999],
"c__RoleNamesGlobal": [
"Administrator",
"Distributed Sending User",
"Marketing Cloud Administrator"
Expand Down
6 changes: 3 additions & 3 deletions test/resources/1111111/user/build-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"NotificationEmailAddress": "user_testTarget@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": "1111111",
"type__c": "User",
"AssociatedBusinessUnits__c": ["1111111", "1111111"],
"RoleNamesGlobal__c": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
"c__type": "User",
"c__AssociatedBusinessUnits": ["1111111", "1111111"],
"c__RoleNamesGlobal": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
}
6 changes: 3 additions & 3 deletions test/resources/1111111/user/create-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"NotificationEmailAddress": "testNew_user@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": 1111111,
"type__c": "User",
"AssociatedBusinessUnits__c": [1111111, 9999999],
"RoleNamesGlobal__c": [
"c__type": "User",
"c__AssociatedBusinessUnits": [1111111, 9999999],
"c__RoleNamesGlobal": [
"Administrator",
"Distributed Sending User",
"Marketing Cloud Administrator"
Expand Down
6 changes: 3 additions & 3 deletions test/resources/1111111/user/retrieve-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"NotificationEmailAddress": "user_test@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": 1111111,
"type__c": "User",
"AssociatedBusinessUnits__c": [1111111, 9999999],
"RoleNamesGlobal__c": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
"c__type": "User",
"c__AssociatedBusinessUnits": [1111111, 9999999],
"c__RoleNamesGlobal": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
}
6 changes: 3 additions & 3 deletions test/resources/1111111/user/template-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"NotificationEmailAddress": "user{{{suffix}}}@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": "1111111",
"type__c": "User",
"AssociatedBusinessUnits__c": ["1111111", "{{{mid}}}"],
"RoleNamesGlobal__c": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
"c__type": "User",
"c__AssociatedBusinessUnits": ["1111111", "{{{mid}}}"],
"c__RoleNamesGlobal": ["Administrator", "Content Creator", "Marketing Cloud Administrator"]
}
6 changes: 3 additions & 3 deletions test/resources/1111111/user/update-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"NotificationEmailAddress": "user_test@accenture.com",
"IsLocked": false,
"DefaultBusinessUnit": 9999999,
"type__c": "User",
"AssociatedBusinessUnits__c": [9999999],
"RoleNamesGlobal__c": [
"c__type": "User",
"c__AssociatedBusinessUnits": [9999999],
"c__RoleNamesGlobal": [
"Administrator",
"Distributed Sending User",
"Marketing Cloud Administrator"
Expand Down
6 changes: 3 additions & 3 deletions test/user.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('user', () => {
);
assert.equal(
testUtils.getAPIHistoryLength(),
4,
6,
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
);
return;
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('user', () => {
);
assert.equal(
testUtils.getAPIHistoryLength(),
7,
9,
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
);
return;
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('user', () => {
);
assert.equal(
testUtils.getAPIHistoryLength(),
4,
6,
'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests'
);
return;
Expand Down

0 comments on commit 05e7d96

Please sign in to comment.