mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12762: Another attempt at SiteServiceImplTest with fixes from Roy git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12764 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -163,13 +163,11 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
catch (Exception exception) {}
|
catch (Exception exception) {}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.siteService.removeMembership(siteInfo.getShortName(), USER_THREE);
|
this.siteService.removeMembership(siteInfo.getShortName(), USER_ONE);
|
||||||
fail("Shouldn't be able to do this cos you don't have permissions");
|
fail("Shouldn't be able to do this cos you don't have permissions");
|
||||||
}
|
}
|
||||||
catch (Exception exception) {}
|
catch (Exception exception) {}
|
||||||
|
this.siteService.removeMembership(siteInfo.getShortName(), USER_THREE);
|
||||||
authenticationComponent.setSystemUserAsCurrentUser();
|
|
||||||
this.siteService.removeMembership(siteInfo.getShortName(), USER_THREE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkSiteInfo( SiteInfo siteInfo, String expectedSitePreset, String expectedShortName, String expectedTitle,
|
private void checkSiteInfo( SiteInfo siteInfo, String expectedSitePreset, String expectedShortName, String expectedTitle,
|
||||||
@@ -444,15 +442,7 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
{
|
{
|
||||||
// As expected
|
// As expected
|
||||||
}
|
}
|
||||||
try
|
this.siteService.removeMembership("testMembership", USER_THREE);
|
||||||
{
|
|
||||||
this.siteService.removeMembership("testMembership", USER_THREE);
|
|
||||||
fail("A member who isn't a manager shouldnt be able to remove a membership");
|
|
||||||
}
|
|
||||||
catch (AlfrescoRuntimeException e)
|
|
||||||
{
|
|
||||||
// As expected
|
|
||||||
}
|
|
||||||
|
|
||||||
this.authenticationComponent.setCurrentUser(USER_ONE);
|
this.authenticationComponent.setCurrentUser(USER_ONE);
|
||||||
// Try and change the permissions of the only site manager
|
// Try and change the permissions of the only site manager
|
||||||
|
Reference in New Issue
Block a user