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
3838 $ configuredOrganization = $ this ->adminImsConfig ->getOrganizationId ();
3939
4040 //@TODO CABPI-324: Change Org check to use new endpoint
41- if (! $ configuredOrganization || !$ token ) {
41+ if ($ configuredOrganization === '' || !$ token ) {
4242 throw new AdobeImsOrganizationAuthorizationException (
4343 __ ('User is not assigned to defined organization. ' )
4444 );
Original file line number Diff line number Diff line change @@ -51,28 +51,19 @@ public function testCheckOrganizationAllocationReturnsTrueWhenProfileAssignedToO
5151
5252 $ this ->assertEquals (
5353 true ,
54- $ this ->imsOrganizationService ->checkOrganizationAllocation ([
55- 'roles ' => [
56- ['organization ' => '12121212ABCD1211AA11ABCD ' , 'named_role ' => 'test ' ]
57- ]
58- ])
54+ $ this ->imsOrganizationService ->checkOrganizationAllocation ('my_token ' )
5955 );
6056 }
6157
6258 public function testCheckOrganizationAllocationThrowsExceptionWhenProfileNotAssignedToOrg ()
6359 {
64- $ this ->markTestSkipped ('CABPI-324: Change Org check to use new endpoint ' );
6560 $ this ->adminImsConfigMock
6661 ->method ('getOrganizationId ' )
67- ->willReturn (self :: INVALID_ORGANIZATION_ID );
62+ ->willReturn ('' );
6863
6964 $ this ->expectException (AdobeImsOrganizationAuthorizationException::class);
70- $ this ->expectExceptionMessage ('Profile is not assigned to defined organization. ' );
65+ $ this ->expectExceptionMessage ('User is not assigned to defined organization. ' );
7166
72- $ this ->imsOrganizationService ->checkOrganizationAllocation ([
73- 'roles ' => [
74- ['organization ' => '12121212ABCD1211AA11ABCD ' , 'named_role ' => 'test ' ]
75- ]
76- ]);
67+ $ this ->imsOrganizationService ->checkOrganizationAllocation ('my_token ' );
7768 }
7869}
You can’t perform that action at this time.
0 commit comments