|
|
@ -618,13 +618,13 @@ public class ProcessDefinitionServiceTest { |
|
|
|
|
|
|
|
|
|
|
|
//project check auth success, process not exist
|
|
|
|
//project check auth success, process not exist
|
|
|
|
putMsg(result, Status.SUCCESS, projectName); |
|
|
|
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, |
|
|
|
Map<String, Object> processNotExistRes = processDefinitionService.verifyProcessDefinitionName(loginUser, |
|
|
|
"project_test1", "test_pdf"); |
|
|
|
"project_test1", "test_pdf"); |
|
|
|
Assert.assertEquals(Status.SUCCESS, processNotExistRes.get(Constants.STATUS)); |
|
|
|
Assert.assertEquals(Status.SUCCESS, processNotExistRes.get(Constants.STATUS)); |
|
|
|
|
|
|
|
|
|
|
|
//process exist
|
|
|
|
//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, |
|
|
|
Map<String, Object> processExistRes = processDefinitionService.verifyProcessDefinitionName(loginUser, |
|
|
|
"project_test1", "test_pdf"); |
|
|
|
"project_test1", "test_pdf"); |
|
|
|
Assert.assertEquals(Status.PROCESS_INSTANCE_EXIST, processExistRes.get(Constants.STATUS)); |
|
|
|
Assert.assertEquals(Status.PROCESS_INSTANCE_EXIST, processExistRes.get(Constants.STATUS)); |
|
|
|