mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-19 07:53:08 +00:00
DS-3851 partially remove legacy workflow to simplify testing
First tests for the workflow endpoint
This commit is contained in:
@@ -509,8 +509,9 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
|
||||
Group g = groupService.create(context);
|
||||
context.restoreAuthSystemState();
|
||||
collection.setWorkflowGroup(context, step, g);
|
||||
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), notNullValue());
|
||||
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(collection, step), equalTo(g));
|
||||
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
|
||||
notNullValue());
|
||||
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(context, collection, step), equalTo(g));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -528,8 +529,10 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
|
||||
context.restoreAuthSystemState();
|
||||
collection.setWorkflowGroup(context, step, g1);
|
||||
collection.setWorkflowGroup(context, step, g2);
|
||||
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), notNullValue());
|
||||
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(collection, step), equalTo(g2));
|
||||
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
|
||||
notNullValue());
|
||||
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(context, collection, step),
|
||||
equalTo(g2));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,7 +542,8 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
|
||||
public void testGetWorkflowGroup() {
|
||||
//null by default
|
||||
int step = 1;
|
||||
assertThat("testGetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), nullValue());
|
||||
assertThat("testGetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
|
||||
nullValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user