Created
December 22, 2014 19:47
-
-
Save plawler/dced13ad54c6e0b7011e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given(~/^multitenant partner data is in the assessment repository$/) { -> | |
response = createAssessment(validAssessment()) | |
def assessmentId = response.json.id | |
sa1 = validStudentAssessment(assessmentId) | |
sa2 = validStudentAssessment(assessmentId) | |
postStudentAssessment(sa1) | |
postStudentAssessment(sa2) | |
} | |
When(~/^the partner retrieves the student assessments$/) { -> | |
} | |
def createAssessment(assessment) { | |
try { | |
response = RestSupport.postAssessment(assessment) | |
} catch (RESTClientException e) { | |
response = e.getResponse() | |
} | |
} | |
def postStudentAssessment(studentAssessment, token = null) { | |
try { | |
if (token != null) response = RestSupport.postStudentAssessmentProxied(studentAssessment, token) | |
else response = RestSupport.postStudentAssessment(studentAssessment) | |
} catch (RESTClientException e) { | |
response = e.getResponse() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment