File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed
app/code/Magento/AdminAdobeIms Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function checkOrganizationAllocation(string $token): bool
38
38
$ configuredOrganization = $ this ->adminImsConfig ->getOrganizationId ();
39
39
40
40
//@TODO CABPI-324: Change Org check to use new endpoint
41
- if (! $ configuredOrganization || !$ token ) {
41
+ if ($ configuredOrganization === '' || !$ token ) {
42
42
throw new AdobeImsOrganizationAuthorizationException (
43
43
__ ('User is not assigned to defined organization. ' )
44
44
);
Original file line number Diff line number Diff line change @@ -51,28 +51,19 @@ public function testCheckOrganizationAllocationReturnsTrueWhenProfileAssignedToO
51
51
52
52
$ this ->assertEquals (
53
53
true ,
54
- $ this ->imsOrganizationService ->checkOrganizationAllocation ([
55
- 'roles ' => [
56
- ['organization ' => '12121212ABCD1211AA11ABCD ' , 'named_role ' => 'test ' ]
57
- ]
58
- ])
54
+ $ this ->imsOrganizationService ->checkOrganizationAllocation ('my_token ' )
59
55
);
60
56
}
61
57
62
58
public function testCheckOrganizationAllocationThrowsExceptionWhenProfileNotAssignedToOrg ()
63
59
{
64
- $ this ->markTestSkipped ('CABPI-324: Change Org check to use new endpoint ' );
65
60
$ this ->adminImsConfigMock
66
61
->method ('getOrganizationId ' )
67
- ->willReturn (self :: INVALID_ORGANIZATION_ID );
62
+ ->willReturn ('' );
68
63
69
64
$ this ->expectException (AdobeImsOrganizationAuthorizationException::class);
70
- $ this ->expectExceptionMessage ('Profile is not assigned to defined organization. ' );
65
+ $ this ->expectExceptionMessage ('User is not assigned to defined organization. ' );
71
66
72
- $ this ->imsOrganizationService ->checkOrganizationAllocation ([
73
- 'roles ' => [
74
- ['organization ' => '12121212ABCD1211AA11ABCD ' , 'named_role ' => 'test ' ]
75
- ]
76
- ]);
67
+ $ this ->imsOrganizationService ->checkOrganizationAllocation ('my_token ' );
77
68
}
78
69
}
You can’t perform that action at this time.
0 commit comments