mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-1027: V1 REST API - fix error handling (update site member)
- already fix on 5.2(.N) so simply add -ve api tests - ACE-5443 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130872 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -573,6 +573,18 @@ public class TestSiteMembers extends EnterpriseTestApi
|
||||
{
|
||||
assertEquals(HttpStatus.SC_BAD_REQUEST, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
|
||||
// cannot update last member of site to be a non-manager
|
||||
try
|
||||
{
|
||||
publicApiClient.setRequestContext(new RequestContext(network1.getId(), person2.getId()));
|
||||
sitesProxy.updateSiteMember(site.getSiteId(), new SiteMember(person2.getId(), SiteRole.SiteContributor.toString()));
|
||||
fail();
|
||||
}
|
||||
catch(PublicApiException e)
|
||||
{
|
||||
assertEquals(HttpStatus.SC_UNPROCESSABLE_ENTITY, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
|
||||
// successful update
|
||||
{
|
||||
|
Reference in New Issue
Block a user