MNT-14901 MNT-13871: 4.2.5 User Auth code merged to 5.1.N caused 2 build failures

- Fixed the test SiteServiceImplTest.testListSiteMemberships that failed after testGroupMembership was fixed, but didn't delete the created site.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@113647 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2015-10-02 16:44:04 +00:00
parent 519bb0e42b
commit 98f27883be

View File

@@ -2051,15 +2051,23 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
// Set a membership with an illegal role. See ALF-619.
// I'm checking that the exception type thrown is what it should be.
boolean failed = false;
try
{
siteService.setMembership("testGroupMembership", groupThree, "rubbish");
}
catch (UnknownAuthorityException expected)
{
return null;
failed = true;
}
authenticationComponent.setSystemUserAsCurrentUser();
siteService.deleteSite("testGroupMembership");
if (!failed)
{
fail("Expected exception not thrown.");
}
fail("Expected exception not thrown.");
return null;
}