Search in sources :

Example 1 with StudentProfileCreateFormUrlAction

use of teammates.ui.controller.StudentProfileCreateFormUrlAction in project teammates by TEAMMATES.

the class StudentProfileCreateFormUrlActionTest method testGenerateUploadUrlSuccessTypical.

private void testGenerateUploadUrlSuccessTypical(AccountAttributes student) {
    ______TS("Typical case");
    String[] submissionParams = new String[] {};
    gaeSimulation.loginAsStudent(student.googleId);
    StudentProfileCreateFormUrlAction action = getAction(submissionParams);
    AjaxResult result = getAjaxResult(action);
    assertFalse(result.isError);
    assertEquals("", result.getStatusMessage());
    verifyLogMessage(student, action, result, false);
}
Also used : AjaxResult(teammates.ui.controller.AjaxResult) StudentProfileCreateFormUrlAction(teammates.ui.controller.StudentProfileCreateFormUrlAction)

Example 2 with StudentProfileCreateFormUrlAction

use of teammates.ui.controller.StudentProfileCreateFormUrlAction in project teammates by TEAMMATES.

the class StudentProfileCreateFormUrlActionTest method testGenerateUploadUrlSuccessMasqueradeMode.

private void testGenerateUploadUrlSuccessMasqueradeMode(AccountAttributes student) {
    ______TS("Typical case: masquerade mode");
    gaeSimulation.loginAsAdmin("admin.user");
    String[] submissionParams = new String[] { Const.ParamsNames.USER_ID, student.googleId };
    StudentProfileCreateFormUrlAction action = getAction(addUserIdToParams(student.googleId, submissionParams));
    AjaxResult result = getAjaxResult(action);
    assertFalse(result.isError);
    assertEquals("", result.getStatusMessage());
    verifyLogMessage(student, action, result, true);
}
Also used : AjaxResult(teammates.ui.controller.AjaxResult) StudentProfileCreateFormUrlAction(teammates.ui.controller.StudentProfileCreateFormUrlAction)

Aggregations

AjaxResult (teammates.ui.controller.AjaxResult)2 StudentProfileCreateFormUrlAction (teammates.ui.controller.StudentProfileCreateFormUrlAction)2