Skip to content

Commit

Permalink
GRAD2-2591
Browse files Browse the repository at this point in the history
Optional Program Completion Date is not being reset when a User UNGRADS a student
  • Loading branch information
arybakov-cgi committed Sep 12, 2024
1 parent c5a5f30 commit 487fc5c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,13 @@ public void testUgradStudent() throws JsonProcessingException {
when(graduationStatusRepository.findById(studentID)).thenReturn(Optional.of(graduationStatusEntity));
when(graduationStatusRepository.save(responseGraduationStatus)).thenReturn(responseGraduationStatus);

StudentOptionalProgramEntity studentOptionalProgramEntity = new StudentOptionalProgramEntity();
studentOptionalProgramEntity.setId(UUID.randomUUID());
studentOptionalProgramEntity.setStudentID(studentID);
studentOptionalProgramEntity.setOptionalProgramCompletionDate(new Date(System.currentTimeMillis()));

when(gradStudentOptionalProgramRepository.findByStudentID(studentID)).thenReturn(List.of(studentOptionalProgramEntity));

var response = graduationStatusService.undoCompletionStudent(studentID, ungradReasonCode,ungradReasonDesc, "accessToken");
assertThat(response).isNotNull();

Expand Down

0 comments on commit 487fc5c

Please sign in to comment.