title: Laravel 5.1 testing with model relationships and factories
body: <p>Currently I have 2 models (and test factories) for:</p>
  
  <ul>
  <li>App\User</li>
  <li>App\Post</li>
  </ul>
  
  <p>I've looked at the docs about test factories with relationships, but nothing is specifically shown for a single instance. What I have now is:</p>
  
  <p><code>$user = factory(App\User::class)-&gt;create();
  $post = factory(App\Post::class)-&gt;create();
  $post-&gt;user()-&gt;save($user);
  </code></p>
  
  <p>I'm currently getting the following PHPUnit error: <code>BadMethodCallException: Call to undefined method Illuminate\Database\Query\Builder::save()</code></p>
  
  <p>I'm probably missing something small here. How can I get this to work?</p>