Skip to content

Instantly share code, notes, and snippets.

@plawler
Created December 22, 2014 19:47
Show Gist options
  • Save plawler/dced13ad54c6e0b7011e to your computer and use it in GitHub Desktop.
Save plawler/dced13ad54c6e0b7011e to your computer and use it in GitHub Desktop.
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