|
|
|
@ -618,13 +618,13 @@ public class ProcessDefinitionServiceTest {
|
|
|
|
|
|
|
|
|
|
//project check auth success, process not exist
|
|
|
|
|
putMsg(result, Status.SUCCESS, projectName); |
|
|
|
|
Mockito.when(processDefineMapper.queryByDefineName(project.getId(), "test_pdf")).thenReturn(null); |
|
|
|
|
Mockito.when(processDefineMapper.verifyByDefineName(project.getId(), "test_pdf")).thenReturn(null); |
|
|
|
|
Map<String, Object> processNotExistRes = processDefinitionService.verifyProcessDefinitionName(loginUser, |
|
|
|
|
"project_test1", "test_pdf"); |
|
|
|
|
Assert.assertEquals(Status.SUCCESS, processNotExistRes.get(Constants.STATUS)); |
|
|
|
|
|
|
|
|
|
//process exist
|
|
|
|
|
Mockito.when(processDefineMapper.queryByDefineName(project.getId(), "test_pdf")).thenReturn(getProcessDefinition()); |
|
|
|
|
Mockito.when(processDefineMapper.verifyByDefineName(project.getId(), "test_pdf")).thenReturn(getProcessDefinition()); |
|
|
|
|
Map<String, Object> processExistRes = processDefinitionService.verifyProcessDefinitionName(loginUser, |
|
|
|
|
"project_test1", "test_pdf"); |
|
|
|
|
Assert.assertEquals(Status.PROCESS_INSTANCE_EXIST, processExistRes.get(Constants.STATUS)); |
|
|
|
|