use of teammates.ui.controller.AdminAccountDeleteAction in project teammates by TEAMMATES.
the class AdminAccountDeletePageActionTest method testExecuteAndPostProcess.
@Override
@Test
public void testExecuteAndPostProcess() {
______TS("success: delete entire account");
InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1");
String[] submissionParams = new String[] { Const.ParamsNames.INSTRUCTOR_ID, instructor1OfCourse1.googleId, "account", "true" };
final String adminUserId = "admin.user";
gaeSimulation.loginAsAdmin(adminUserId);
AdminAccountDeleteAction deleteAction = getAction(submissionParams);
RedirectResult result = getRedirectResult(deleteAction);
assertNull(AccountsLogic.inst().getAccount(instructor1OfCourse1.googleId));
assertEquals(Const.StatusMessages.INSTRUCTOR_ACCOUNT_DELETED, result.getStatusMessage());
assertEquals(getPageResultDestination(Const.ActionURIs.ADMIN_ACCOUNT_MANAGEMENT_PAGE, false, adminUserId), result.getDestinationWithParams());
}
Aggregations