use of teammates.ui.controller.InstructorFeedbackDeleteAction in project teammates by TEAMMATES.
the class InstructorFeedbackDeleteActionTest method testExecuteAndPostProcess.
@Override
@Test
public void testExecuteAndPostProcess() {
FeedbackSessionsDb fsDb = new FeedbackSessionsDb();
FeedbackSessionAttributes fs = typicalBundle.feedbackSessions.get("session1InCourse1");
String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, fs.getCourseId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, fs.getFeedbackSessionName() };
InstructorAttributes instructor = typicalBundle.instructors.get("instructor1OfCourse1");
gaeSimulation.loginAsInstructor(instructor.googleId);
assertNotNull(fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName()));
InstructorFeedbackDeleteAction a = getAction(submissionParams);
RedirectResult r = getRedirectResult(a);
assertNull(fsDb.getFeedbackSession(fs.getCourseId(), fs.getFeedbackSessionName()));
assertEquals(getPageResultDestination(Const.ActionURIs.INSTRUCTOR_FEEDBACK_SESSIONS_PAGE, false, "idOfInstructor1OfCourse1"), r.getDestinationWithParams());
assertEquals(Const.StatusMessages.FEEDBACK_SESSION_DELETED, r.getStatusMessage());
assertFalse(r.isError);
}
Aggregations