91356: Fix tests

This commit is contained in:
Bruno Roemers
2022-05-23 14:33:59 +02:00
parent 3916d58222
commit bc2b53b9c5
2 changed files with 4 additions and 1 deletions

View File

@@ -158,6 +158,9 @@ public class BundleServiceImpl extends DSpaceObjectServiceImpl<Bundle> implement
}
bundle.addBitstream(bitstream);
if (bitstream.isDeleted()) {
bitstream.setDeleted(false);
}
bitstream.getBundles().add(bundle);

View File

@@ -627,7 +627,7 @@ public class BitstreamControllerIT extends AbstractControllerIntegrationTest {
)).andExpect(status().isOk());
// at this moment the bitstream should NOT be marked as deleted, because it has been attached to target bundle
assertFalse(bitstream.isDeleted());
assertFalse(context.reloadEntity(bitstream).isDeleted());
targetBundle = bundleService.find(context, targetBundle.getID());
String name = targetBundle.getName();