Hello,
I am writing some acceptance tests for a Scala Play application and I am not sure how to test functionality using reverse routes.
The `call` method accepts a value of type EssentialAction, but the value of a reverse route is `Call`.
What is the best way to call a reverse route using Scalatest?
scenario("Some scenario") {
Given("A valid header")
val request = FakeRequest().withHeaders((ACCEPT, "application/xml"))
When("the request is made with a valid foo")
val result = call(controllers.routes.MyController.get(Foo("Some string")), request) // This does not compile
Then("the status returned should be a 200")
status(result) mustEqual 200
}
Thanks
Michael