mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
58214: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 58197: MNT-8886: Unit test added in r57899 should have removed the group it added. Caused build error in other tests. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61953 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -317,12 +317,15 @@ public abstract class AbstractMailActionExecuterTest
|
||||
|
||||
@Test
|
||||
public void testPrepareEmailForDisabledUsers() throws MessagingException
|
||||
{
|
||||
String groupName = null;
|
||||
try
|
||||
{
|
||||
final String USER1 = "test_user1";
|
||||
final String USER2 = "test_user2";
|
||||
createUser(USER1);
|
||||
NodeRef userNode = createUser(USER2);
|
||||
String groupName = AUTHORITY_SERVICE.createAuthority(AuthorityType.GROUP, "testgroup1");
|
||||
groupName = AUTHORITY_SERVICE.createAuthority(AuthorityType.GROUP, "testgroup1");
|
||||
AUTHORITY_SERVICE.addAuthority(groupName, USER1);
|
||||
AUTHORITY_SERVICE.addAuthority(groupName, USER2);
|
||||
NODE_SERVICE.addAspect(userNode, ContentModel.ASPECT_PERSON_DISABLED, null);
|
||||
@@ -348,6 +351,14 @@ public abstract class AbstractMailActionExecuterTest
|
||||
Assert.assertEquals(1, addresses.length);
|
||||
Assert.assertEquals(USER1 + "@email.com", addresses[0].toString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (groupName != null)
|
||||
{
|
||||
AUTHORITY_SERVICE.deleteAuthority(groupName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private NodeRef createUser(String userName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user