title: Asp.Net Mvc Unittesting a controller action
body: <p>I have the following action that Im trying to unit test:</p>
  
  <pre><code>    [AcceptVerbs(HttpVerbs.Post)]
      public ActionResult Default(ProductsViewModel model)
      {
          var locationId = model.LocationId;
          var locationText = model.LocationText;
  
          return locationId &gt; 0 ? Summary(locationId, locationText, 1, "Date", true) : View();
      }
  </code></pre>
  
  <p>If the viewmodel is empty, then just a view is returned. But if it contains an id, then the summary action is called and does all the work (calling the db, building a new viewmodel etc). </p>
  
  <p>But how can I assert in a unit test that it was called?</p>