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:
Kevin Roast
2009-01-15 11:14:15 +00:00
parent b1cfa409b0
commit aa08480190

View File

@@ -163,13 +163,11 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
catch (Exception exception) {}
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");
}
catch (Exception exception) {}
authenticationComponent.setSystemUserAsCurrentUser();
this.siteService.removeMembership(siteInfo.getShortName(), USER_THREE);
catch (Exception exception) {}
this.siteService.removeMembership(siteInfo.getShortName(), USER_THREE);
}
private void checkSiteInfo( SiteInfo siteInfo, String expectedSitePreset, String expectedShortName, String expectedTitle,
@@ -444,15 +442,7 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
{
// As expected
}
try
{
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.siteService.removeMembership("testMembership", USER_THREE);
this.authenticationComponent.setCurrentUser(USER_ONE);
// Try and change the permissions of the only site manager