Skip to content

Commit

Permalink
Update tests for GetStudentsActionTest
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyang143 committed Mar 12, 2025
1 parent fa2ffc5 commit 9782fe3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void testExecute_instructorWithPermission_success() {
}

@Test
void testExecute_instructorWithoutPermission_emptyList() {
void testExecute_instructorWithoutPermissionWithInvalidTeamParams_emptyList() {
loginAsInstructor(stubInstructorWithoutPrivileges.getGoogleId());
when(mockLogic.getInstructorByGoogleId(stubCourse.getId(), stubInstructorWithoutPrivileges.getGoogleId()))
.thenReturn(stubInstructorWithoutPrivileges);
Expand Down Expand Up @@ -198,7 +198,7 @@ void testExecute_instructorWithDifferentSectionPrivilegesAsStudents_emptyList()
false, Const.DEFAULT_DISPLAY_NAME_FOR_INSTRUCTOR, customRole, wrongPrivileges);
loginAsInstructor(stubInstructorWithOnlyViewPrivilegesForDifferentSection.getGoogleId());
when(mockLogic.getInstructorByGoogleId(stubCourse.getId(),
stubInstructorWithOnlyViewSectionPrivileges.getGoogleId()))
stubInstructorWithOnlyViewPrivilegesForDifferentSection.getGoogleId()))
.thenReturn(stubInstructorWithOnlyViewPrivilegesForDifferentSection);
when(mockLogic.getStudentsForCourse(stubCourse.getId())).thenReturn(stubStudentListTwo);

Expand Down Expand Up @@ -512,7 +512,7 @@ void testSpecificAccessControl_invalidParams_throwsInvalidHttpParameterException
}

@Test
void testSpecificAccessControl_anotherCourseFromInstructor_cannotAccess() {
void testSpecificAccessControl_wrongCourse_cannotAccess() {
loginAsInstructor(stubInstructorWithAllPrivileges.getGoogleId());
when(mockLogic.getInstructorByGoogleId("another-course-id", stubInstructorWithAllPrivileges.getGoogleId()))
.thenReturn(null);
Expand Down

0 comments on commit 9782fe3

Please sign in to comment.