Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ziqing26 committed Mar 18, 2022
1 parent b268b5d commit 8e13258
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/test/java/teammates/ui/webapi/GetNotificationActionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,47 +43,47 @@ protected void testAccessControl() {
loginAsInstructor(instructor.getGoogleId());
______TS("student notification not accessible to instructor");
String[] requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyCannotAccess(requestParams);

______TS("accessible to instructor");
requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.INSTRUCTOR.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.INSTRUCTOR.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyCanAccess(requestParams);

______TS("instructor notification not accessible to student");
StudentAttributes studentAttributes = typicalBundle.students.get("student1InCourse1");
loginAsStudent(studentAttributes.getGoogleId());
requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.INSTRUCTOR.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.INSTRUCTOR.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyCannotAccess(requestParams);

______TS("accessible to student");
requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyCanAccess(requestParams);

______TS("unknown target user");
loginAsInstructor(instructor.getGoogleId());
requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, "unknown",
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, "unknown",
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyHttpParameterFailureAcl(requestParams);

______TS("accessible to admin");
loginAsAdmin();
requestParams = new String[] {
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
Const.ParamsNames.NOTIFICATION_TARGET_USER, NotificationTargetUser.STUDENT.toString(),
Const.ParamsNames.NOTIFICATION_IS_FETCHING_ALL, String.valueOf(true),
};
verifyCanAccess(requestParams);
}
Expand Down

0 comments on commit 8e13258

Please sign in to comment.