title: Testing Laravel Eloquent Relationship
body: <p>I'd like to know what's the best approach to ensure that my <code>Activity</code> model belongs to a <code>User</code>.</p>
  
  <p><strong>Activity.php</strong></p>
  
  <pre><code>...
  
  public function user()
  {
     return $this-&gt;belongsTo(User::class);
  }
  </code></pre>
  
  <p>How can I write a test that ensure that the <code>Activity</code> model has that relationship?</p>