Skip to content

Commit eeb2f84

Browse files
committed
CABPI-324: Change Org check to use new endpoint
1 parent 7bc8a74 commit eeb2f84

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

app/code/Magento/AdminAdobeIms/Test/Unit/Service/ImsOrganizationServiceTest.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,15 @@ protected function setUp(): void
4343
);
4444
}
4545

46-
public function testCheckOrganizationAllocationReturnsTrueWhenProfileAssignedToOrg()
46+
public function testCheckOrganizationMembershipThrowsExceptionWhenProfileNotAssignedToOrg()
4747
{
4848
$this->adminImsConfigMock
4949
->method('getOrganizationId')
50-
->willReturn(self::VALID_ORGANIZATION_ID);
51-
52-
$this->assertEquals(
53-
true,
54-
$this->imsOrganizationService->checkOrganizationAllocation('my_token')
55-
);
56-
}
57-
58-
public function testCheckOrganizationAllocationThrowsExceptionWhenProfileNotAssignedToOrg()
59-
{
60-
$this->adminImsConfigMock
61-
->method('getOrganizationId')
62-
->willReturn('');
50+
->willReturn(self::INVALID_ORGANIZATION_ID);
6351

6452
$this->expectException(AdobeImsOrganizationAuthorizationException::class);
65-
$this->expectExceptionMessage('User is not assigned to defined organization.');
53+
$this->expectExceptionMessage('Can\'t check user membership in organization.');
6654

67-
$this->imsOrganizationService->checkOrganizationAllocation('my_token');
55+
$this->imsOrganizationService->checkOrganizationMembership('my_token');
6856
}
6957
}

0 commit comments

Comments
 (0)