mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
104878 Adjust ItemServiceTest to expect correct behavior of bundles when item is migrated
This commit is contained in:
@@ -764,8 +764,8 @@ public class ItemServiceTest extends AbstractIntegrationTestWithDatabase {
|
|||||||
public void testMoveItemToCollectionWithMoreRestrictiveItemReadPolicy() throws Exception {
|
public void testMoveItemToCollectionWithMoreRestrictiveItemReadPolicy() throws Exception {
|
||||||
/* Verify that, if we move an item from a collection with a permissive default item READ policy
|
/* Verify that, if we move an item from a collection with a permissive default item READ policy
|
||||||
* to a collection with a restrictive default item READ policy,
|
* to a collection with a restrictive default item READ policy,
|
||||||
* that the item does not retain the original permissive item READ policy.
|
* that the item and its bundles do not retain the original permissive item READ policy.
|
||||||
* However, its bundles and bitstreams do.
|
* However, its bitstreams do.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
@@ -820,7 +820,7 @@ public class ItemServiceTest extends AbstractIntegrationTestWithDatabase {
|
|||||||
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
assertEquals(
|
assertEquals(
|
||||||
List.of(anonymous),
|
List.of(admin),
|
||||||
authorizeService.getPoliciesActionFilter(context, bundle, Constants.READ)
|
authorizeService.getPoliciesActionFilter(context, bundle, Constants.READ)
|
||||||
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
@@ -837,8 +837,8 @@ public class ItemServiceTest extends AbstractIntegrationTestWithDatabase {
|
|||||||
public void testMoveItemToCollectionWithMoreRestrictiveBitstreamReadPolicy() throws Exception {
|
public void testMoveItemToCollectionWithMoreRestrictiveBitstreamReadPolicy() throws Exception {
|
||||||
/* Verify that, if we move an item from a collection with a permissive default bitstream READ policy
|
/* Verify that, if we move an item from a collection with a permissive default bitstream READ policy
|
||||||
* to a collection with a restrictive default bitstream READ policy,
|
* to a collection with a restrictive default bitstream READ policy,
|
||||||
* that the item's bundles and bitstreams do not retain the original permissive READ policy.
|
* that the item's bitstreams do not retain the original permissive READ policy.
|
||||||
* However, the item itself does retain the original policy.
|
* However, the item itself and its bundles do retain the original policy.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
@@ -893,7 +893,7 @@ public class ItemServiceTest extends AbstractIntegrationTestWithDatabase {
|
|||||||
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
assertEquals(
|
assertEquals(
|
||||||
List.of(admin),
|
List.of(anonymous),
|
||||||
authorizeService.getPoliciesActionFilter(context, bundle, Constants.READ)
|
authorizeService.getPoliciesActionFilter(context, bundle, Constants.READ)
|
||||||
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
.stream().map(ResourcePolicy::getGroup).collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user