Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esjewett/254979 to your computer and use it in GitHub Desktop.
Save esjewett/254979 to your computer and use it in GitHub Desktop.
val post_session = post("session", "token" -> token)
"API2" should {
"/session POST" in {
def withSession(a: => Any) = for(sess <- post_session) { a }
doAroundExpectations(withSession(_))
"Attempt to log in with a valid token should succeed with a 200 response" in {
(sess.xml \ "session" \ "user" \ "id").text must be equalTo (theUser.id.toString)
sess.code must be equalTo 200
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment