modifying unit tests as per CI feedback, stubbings now unnecessary

This commit is contained in:
Kim Shepherd
2023-05-21 15:42:56 +12:00
parent 2ef268380f
commit 208cac08d5
2 changed files with 0 additions and 5 deletions

View File

@@ -725,9 +725,6 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
// Allow Item REMOVE perms
doNothing().when(authorizeServiceSpy)
.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
context.turnOffAuthorisationSystem();

View File

@@ -1189,8 +1189,6 @@ public class ItemTest extends AbstractDSpaceObjectTest {
doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.REMOVE, true);
// Allow Item DELETE perms
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();
itemService.delete(context, item);