Skip to content

Commit

Permalink
test: fix failing
Browse files Browse the repository at this point in the history
  • Loading branch information
MMilosz committed Sep 20, 2024
1 parent b011b6e commit 8e66993
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void deleteVersionedItem(Context c, Version versionToDelete, VersionHisto
@Override
public Item updateItemState(Context c, Item itemNew, Item previousItem) {
try {
itemService.copy(c, itemNew, previousItem);
itemService.copy(c, itemNew, previousItem, getIgnoredMetadataFields(), true, true, true);
} catch (IOException | SQLException | AuthorizeException e) {
throw new RuntimeException(e.getMessage(), e);
}
Expand Down
5 changes: 0 additions & 5 deletions dspace-api/src/test/java/org/dspace/content/ItemTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ public void testCreate() throws Exception {

@Test
public void testClone() throws Exception {
// Allow Collection WRITE perms
doNothing().when(authorizeServiceSpy).authorizeAction(context, collection, Constants.ADD);

Item source = it;
Item target = itemService.clone(context, source, collection);

Expand Down Expand Up @@ -234,9 +231,7 @@ public void testCopy() throws Exception {
assertThat("testCopy 1", target, notNullValue());

// Set appropriate permissions
doNothing().when(authorizeServiceSpy).authorizeAction(context, target, Constants.ADD);
doNothing().when(authorizeServiceSpy).authorizeAction(context, target, Constants.WRITE);
doNothing().when(authorizeServiceSpy).authorizeAction(context, source, Constants.WRITE);

// Add new metadata to source item
String schema = "dc";
Expand Down

0 comments on commit 8e66993

Please sign in to comment.