small fixes

This commit is contained in:
cagache
2019-11-20 11:24:21 +02:00
parent 410778432a
commit 47e669e4e8
2 changed files with 7 additions and 8 deletions

View File

@@ -138,8 +138,7 @@ public class AuditAddToHoldTests extends BaseRMRestTest
recordFolderToBeAdded.getName()));
String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
recordFolder.getName(), recordToBeAdded.getName()));
String contentPath = contentToBeAdded.getCmisLocation();
contentPath = contentPath.substring(contentPath.indexOf(documentLibrary));
String contentPath = "/Company Home" + contentToBeAdded.getCmisLocation();
return new String[][]
{
@@ -262,10 +261,10 @@ public class AuditAddToHoldTests extends BaseRMRestTest
assertEquals("The list of events should contain Add to Hold entries for both holds", 2, auditEntries.size());
assertTrue("The hold name value for the first add to hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains(
Collections.singletonList(ImmutableMap.of("new", HOLD1, "previous", "", "name", "Hold Name")))));
ImmutableMap.of("new", HOLD1, "previous", "", "name", "Hold Name"))));
assertTrue("The hold name value for the second add to hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains(
Collections.singletonList(ImmutableMap.of("new", HOLD2, "previous", "", "name", "Hold Name")))));
ImmutableMap.of("new", HOLD2, "previous", "", "name", "Hold Name"))));
}
/**

View File

@@ -149,8 +149,8 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest
heldRecordFolder.getName()));
String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
recordFolder.getName(), heldRecord.getName()));
String contentPath = heldContent.getCmisLocation();
contentPath = contentPath.substring(contentPath.indexOf(documentLibrary));
String contentPath = "/Company Home" + heldContent.getCmisLocation();
return new String[][]
{
// a record folder
@@ -295,10 +295,10 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest
auditEntries.size());
assertTrue("The hold name value for the first remove from hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains(
Collections.singletonList(ImmutableMap.of("new", "", "previous", HOLD1, "name", "Hold Name")))));
ImmutableMap.of("new", "", "previous", HOLD1, "name", "Hold Name"))));
assertTrue("The hold name value for the second remove from hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains(
Collections.singletonList(ImmutableMap.of("new", "", "previous", HOLD2, "name", "Hold Name")))));
ImmutableMap.of("new", "", "previous", HOLD2, "name", "Hold Name"))));
}
/**