New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play Testing API does not handle absent body for POST request #8632
Comments
@techmoksha I tried hard, but I can not reproduce the exception using Play-Scala 2.6.13. I used following test, because the example you give in the original discussion does compile... package controllers
import org.scalatestplus.play._
import org.scalatestplus.play.guice._
import play.api.test.Helpers._
import play.api.test._
class HomeControllerSpec extends PlaySpec with GuiceOneAppPerTest with Injecting {
"HomeController POST" should {
"not throw an exception with empty body" in {
val request = FakeRequest(POST, "/uri").withHeaders("<myheader>" -> "headervalue")
val result = Helpers.route(fakeApplication, request)
}
}
} |
I had a look again because I was working on related code. However, I am still not able to reproduce this. The only place where Because there is no reproducer I will close this. |
Play Version (2.5.x / etc)
Play 2.6.13 (play-test_2.12-2.6.13)
API
Scala
Operating System
Mac OS 10.12.1
JDK
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Expected Behavior
Actual Behavior
Reproducible Test Case
The post has the code snippet to reproduce the issue.
The text was updated successfully, but these errors were encountered: