Skip to content

Commit

Permalink
#1010: added installed package to test for type user
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jun 30, 2023
1 parent 822864f commit 22de4fa
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,67 @@
<RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<OverallStatus>OK</OverallStatus>
<RequestID>5347bf1d-e801-486a-b4a9-c2d46a8909b6</RequestID>

<Results xsi:type="AccountUser">
<Client>
<ID>1111111</ID>
<ModifiedBy>0</ModifiedBy>
</Client>
<PartnerKey xsi:nil="true" />
<CreatedDate>2016-07-22T11:52:37.42</CreatedDate>
<ModifiedDate>2023-05-27T07:05:55.113</ModifiedDate>
<ID>7471228</ID>
<ObjectID xsi:nil="true" />
<CustomerKey>45372cbb-06e0-438e-88d8-008981f7a18b</CustomerKey>
<AccountUserID>7471228</AccountUserID>
<UserID>20f2d94a-9a7d-4580-9fb6-c36a1ce32fb9</UserID>
<Name>igopredictiveemail app user</Name>
<Email />
<MustChangePassword>false</MustChangePassword>
<ActiveFlag>true</ActiveFlag>
<Delete>0</Delete>
<LastSuccessfulLogin></LastSuccessfulLogin>
<IsAPIUser>true</IsAPIUser>
<NotificationEmailAddress />
<IsLocked>false</IsLocked>
<DefaultBusinessUnit>1111111</DefaultBusinessUnit>
<Locale>
<PartnerKey xsi:nil="true" />
<ObjectID xsi:nil="true" />
<LocaleCode>en-GB</LocaleCode>
</Locale>
<TimeZone>
<PartnerKey xsi:nil="true" />
<ID>5</ID>
<ObjectID xsi:nil="true" />
<Name>(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</Name>
</TimeZone>
<DefaultBusinessUnitObject>
<PartnerKey xsi:nil="true" />
<ID>1111111</ID>
<ObjectID xsi:nil="true" />
<AccountType>None</AccountType>
<Subscription xsi:nil="true" />
</DefaultBusinessUnitObject>
<Roles>
<Role>
<Client>
<ID>1111111</ID>
<CreatedBy>0</CreatedBy>
<ModifiedBy>0</ModifiedBy>
<EnterpriseID>1111111</EnterpriseID>
</Client>
<PartnerKey xsi:nil="true" />
<CreatedDate>2016-07-22T17:52:37.88</CreatedDate>
<ModifiedDate>2016-07-22T17:52:37.88</ModifiedDate>
<ObjectID>44d0b80f-3550-e611-96fe-38eaa7142c61</ObjectID>
<CustomerKey>Individual role for 7471228</CustomerKey>
<Name>Individual role for 7471228</Name>
<Description>Individual role for 7471228</Description>
<IsPrivate>true</IsPrivate>
<IsSystemDefined>false</IsSystemDefined>
</Role>
</Roles>
</Results>
</RetrieveResponseMsg>
</soap:Body>
</soap:Envelope>
3 changes: 2 additions & 1 deletion test/resources/1111111/user/retrieve-expected.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
| user test-inactive | 96 days | - | - | - | - | <nobr>_ParentBU_ (1111111)</nobr> | <nobr>_ParentBU_ (1111111)</nobr> | <nobr>Administrator,</nobr><br> <nobr>Content Creator,</nobr><br> <nobr>Marketing Cloud Administrator</nobr> | user_test-inactive@accenture.asgr | 700301951 | testExisting_user_inactive | user_test-inactive@accenture.com | user_test-inactive@accenture.com | GMT+01:00 | en-GB | 2022-06-21 01:43:02.64 | 123456 | 2019-09-06 01:59:07.097 |


## Installed Packages (0)
## Installed Packages (1)

| Name | Last successful Login | Active | Access Locked out | API User | Must change PW | Default BU | BU Access | Roles | Login | ID | Key | E-Mail | Notification E-Mail | Timezone | SFMC Locale | Modified Date | Modified By | Created Date |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| igopredictiveemail app user | never || - || - | <nobr>_ParentBU_ (1111111)</nobr> | <nobr>_ParentBU_ (1111111)</nobr> | <nobr></nobr> | 20f2d94a-9a7d-4580-9fb6-c36a1ce32fb9 | 7471228 | 45372cbb-06e0-438e-88d8-008981f7a18b | | | GMT+01:00 | en-GB | 2023-05-27 07:05:55.113 | n/a | 2016-07-22 11:52:37.42 |
19 changes: 12 additions & 7 deletions test/type.user.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ describe('type: user', () => {
const result = cache.getCache();
assert.equal(
result.user ? Object.keys(result.user).length : 0,
2,
'only two users expected'
3,
'only three users expected'
);
assert.deepEqual(
await testUtils.getActualJson('testExisting_user', 'user', '_ParentBU_'),
Expand Down Expand Up @@ -86,6 +86,7 @@ describe('type: user', () => {
const expectedCache = [
'testExisting_user',
'testExisting_user_inactive',
'45372cbb-06e0-438e-88d8-008981f7a18b',
'testNew_user',
];
await handler.deploy('testInstance/_ParentBU_', ['user'], expectedCache);
Expand All @@ -96,8 +97,8 @@ describe('type: user', () => {
const result = cache.getCache();
assert.equal(
result.user ? Object.keys(result.user).length : 0,
3,
'three users expected'
4,
'four users expected'
);
// confirm if result.user only includes values from expectedCache
assert.deepEqual(
Expand Down Expand Up @@ -130,7 +131,11 @@ describe('type: user', () => {
});
it('Should not deploy user with Marketing Cloud role', async () => {
// WHEN
const expectedCache = ['testExisting_user', 'testExisting_user_inactive'];
const expectedCache = [
'testExisting_user',
'testExisting_user_inactive',
'45372cbb-06e0-438e-88d8-008981f7a18b',
];
await handler.deploy('testInstance/_ParentBU_', ['user'], ['testBlocked_user']);
// THEN
assert.equal(process.exitCode, 1, 'Deployment should have thrown an error');
Expand All @@ -139,8 +144,8 @@ describe('type: user', () => {
const result = cache.getCache();
assert.equal(
result.user ? Object.keys(result.user).length : 0,
2,
'two users expected'
3,
'three users expected'
);
// confirm if result.user only includes values from expectedCache
assert.deepEqual(
Expand Down

0 comments on commit 22de4fa

Please sign in to comment.