mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 11:03:12 +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
|
// can verify during a restore whether the same *type* of resource
|
||||||
// is reusing this handle!
|
// is reusing this handle!
|
||||||
handle.setDSpaceObject(null);
|
handle.setDSpaceObject(null);
|
||||||
|
|
||||||
|
//Also remove the handle from the DSO list to keep a consistent model
|
||||||
dso.getHandles().remove(handle);
|
dso.getHandles().remove(handle);
|
||||||
|
|
||||||
handleDAO.save(context, handle);
|
handleDAO.save(context, handle);
|
||||||
|
|
||||||
if(log.isDebugEnabled())
|
if(log.isDebugEnabled())
|
||||||
|
@@ -166,9 +166,10 @@ public class VersioningTest extends AbstractUnitTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testVersionDelete() throws Exception {
|
public void testVersionDelete() throws Exception {
|
||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
|
String handle = versionedItem.getHandle();
|
||||||
versionService.removeVersion(context, versionedItem);
|
versionService.removeVersion(context, versionedItem);
|
||||||
assertThat("Test_version_delete", itemService.find(context, versionedItem.getID()), nullValue());
|
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();
|
context.restoreAuthSystemState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user