mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
modifying unit tests as per CI feedback, stubbings now unnecessary
This commit is contained in:
@@ -725,9 +725,6 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
|
|||||||
// Allow Item REMOVE perms
|
// Allow Item REMOVE perms
|
||||||
doNothing().when(authorizeServiceSpy)
|
doNothing().when(authorizeServiceSpy)
|
||||||
.authorizeAction(any(Context.class), any(Item.class), eq(Constants.REMOVE));
|
.authorizeAction(any(Context.class), any(Item.class), eq(Constants.REMOVE));
|
||||||
// Allow Item WRITE perms (Needed to remove identifiers, e.g. DOI, before Item deletion)
|
|
||||||
doNothing().when(authorizeServiceSpy)
|
|
||||||
.authorizeAction(any(Context.class), any(Item.class), eq(Constants.WRITE));
|
|
||||||
|
|
||||||
// create & add item first
|
// create & add item first
|
||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
|
@@ -1189,8 +1189,6 @@ public class ItemTest extends AbstractDSpaceObjectTest {
|
|||||||
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.REMOVE, true);
|
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.REMOVE, true);
|
||||||
// Allow Item DELETE perms
|
// Allow Item DELETE perms
|
||||||
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.DELETE);
|
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.DELETE);
|
||||||
// Allow Item WRITE perms (required to first delete identifiers)
|
|
||||||
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.WRITE);
|
|
||||||
|
|
||||||
UUID id = item.getID();
|
UUID id = item.getID();
|
||||||
itemService.delete(context, item);
|
itemService.delete(context, item);
|
||||||
|
Reference in New Issue
Block a user