title: How to test Zentasks sample app from Play 2.0
body: <p>I play with Play 2.0, Scala version. Currently, I analyze <a href="https://github.com/playframework/Play20/tree/master/samples/scala/zentasks" rel="nofollow">Zentasks sample app</a>.</p>
  
  <p>One of the part of this app is authentication mechanism mostly covered in <code>Secured</code> trait. I'm wondering how I can test secured actions, ex. <code>index</code> from <a href="https://github.com/playframework/Play20/blob/master/samples/scala/zentasks/app/controllers/Projects.scala" rel="nofollow">Projects controller</a>.</p>
  
  <p>For not-secured action, I'd probably do something like</p>
  
  <pre><code>val result = controllers.Projects.index(FakeRequest())
  </code></pre>
  
  <p>to run an action and get its result.</p>
  
  <p>What should I do in case of the secured action?</p>
  
  <p><em>Disclaimer</em>: I'm totally new to both Scala and Play, so all hints are very valuable. Thanks!</p>