I've got a test case that is supposed to verify that, after a POST call, the user is redirected to the correct page.
"Redirect Page" in {
running(FakeApplication()) {
val Some(result) = route(FakeRequest(POST, "/product/add/something")
.withFormUrlEncodedBody(
"Id" -> "666",
)
.withSession("email" -> "User")
)
status(result) must equalTo(SEE_OTHER)
// contentAsString(result) at this point is just blank
This verifies that a redirect URL is given. How do I then get the unit test to go to the redirected URL so that I can verify its content?