title: How to test actions that expect an uploaded file in Play Framework (version 2.0, using Scala)?
body: <p>The <a href="http://scala.playframework.org/documentation/2.0.4/ScalaFunctionalTest" rel="noreferrer">Writing functional tests</a> 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 <code>Map</code> to <code>FakeRequest</code> like so:</p>
  
  <pre><code>val Some(result) = routeAndCall(FakeRequest(POST, "/path/to/test", FakeHeaders(),
                                  Map("postedVariable" -&gt; Seq("and a value"))))
  </code></pre>
  
  <p>However, that doesn't seem to allow for the case of an "uploaded" file.</p>