diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherController.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherController.java index 264e2681..b05dab38 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherController.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherController.java @@ -503,7 +503,7 @@ public ResponseEntity launchRegenerateSchoolReports(@RequestBody Student @PreAuthorize(PermissionsConstants.RUN_GRAD_ALGORITHM) @Operation(summary = "Re-Generate School Reports for the given batchJobId", description = "Re-Generate School Reports for the given batchJobId", tags = { "RE-RUN" }) @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"),@ApiResponse(responseCode = "500", description = "Internal Server Error")}) - public ResponseEntity launchRegenerateSchoolReportsBatch(@RequestBody StudentSearchRequest searchRequest, @RequestParam(required = false) String type) { + public ResponseEntity launchRegenerateSchoolReportsBatch(@RequestBody StudentSearchRequest searchRequest) { logger.debug("launchSchoolReportRegenJob"); BatchJobResponse response = new BatchJobResponse(); JobParametersBuilder builder = new JobParametersBuilder(); diff --git a/api/src/test/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherControllerTest.java b/api/src/test/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherControllerTest.java index fa3b2918..64d381b0 100644 --- a/api/src/test/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherControllerTest.java +++ b/api/src/test/java/ca/bc/gov/educ/api/batchgraduation/controller/JobLauncherControllerTest.java @@ -573,14 +573,15 @@ public void testSpcRegGradJob() { public void testLaunchRegenerateSchoolReportsJob() { boolean exceptionIsThrown = false; StudentSearchRequest req = new StudentSearchRequest(); - req.setPens(Arrays.asList("123213123")); + req.setSchoolOfRecords(Arrays.asList("12345678")); + req.setReportTypes(Arrays.asList("NONGRADPRJ")); try { - jobLauncherController.launchRegenerateSchoolReports(req, null); + jobLauncherController.launchRegenerateSchoolReportsBatch(req); } catch (Exception e) { exceptionIsThrown = true; } - assertThat(exceptionIsThrown).isFalse(); + assertThat(exceptionIsThrown).isTrue(); } @Test