The Writing functional tests portion of the documentation is pretty skimpy and lacks details on submitting mock form values completely. I somehow (can't remember how/where) determined you can submit basic form values (mocking a POST request) by passing a Map
to FakeRequest
like so:
val Some(result) = routeAndCall(FakeRequest(POST, "/path/to/test", FakeHeaders(),
Map("postedVariable" -> Seq("and a value"))))
However, that doesn't seem to allow for the case of an "uploaded" file.