Scalatra Testing
class TestAccountServiceSpec extends BaseScalatraFlatSuite with Logging {
addServlet(new TestAccountService, "/*")
"Test Account Service" should "verify if email addresses use the Netflix domain" in {
val body = """{
"country":"US", "password":"pass", "fname":"ScalaX"
"email":"
[email protected]",
}"""
postJsonWithToken("/", body)(TestUserTokens.brendanToken) {
status should equal(BadRequest().status.code)
log.debug("Returned, status = %s, body = %s", status, body)
}
}
}