mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
DS-3579: Fix tests
This commit is contained in:
@@ -231,7 +231,10 @@ public class HandleServiceImpl implements HandleService
|
||||
// can verify during a restore whether the same *type* of resource
|
||||
// is reusing this handle!
|
||||
handle.setDSpaceObject(null);
|
||||
|
||||
//Also remove the handle from the DSO list to keep a consistent model
|
||||
dso.getHandles().remove(handle);
|
||||
|
||||
handleDAO.save(context, handle);
|
||||
|
||||
if(log.isDebugEnabled())
|
||||
|
@@ -166,9 +166,10 @@ public class VersioningTest extends AbstractUnitTest {
|
||||
@Test
|
||||
public void testVersionDelete() throws Exception {
|
||||
context.turnOffAuthorisationSystem();
|
||||
String handle = versionedItem.getHandle();
|
||||
versionService.removeVersion(context, versionedItem);
|
||||
assertThat("Test_version_delete", itemService.find(context, versionedItem.getID()), nullValue());
|
||||
assertThat("Test_version_handle_delete", handleService.resolveToObject(context, versionedItem.getHandle()), nullValue());
|
||||
assertThat("Test_version_handle_delete", handleService.resolveToObject(context, handle), nullValue());
|
||||
context.restoreAuthSystemState();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user