The accepted answer did not help me. I did the following to solve the problem I saw.
This was my action:
[Route("All")] public ActionResult All() { return PartialView("_StatusFilter",MyAPI.Status.GetAllStatuses()); }
I had to give the result to the type so that it worked. I used PartialViewResult for my action, returning Partial View, unlike other actions that return a full view and use View Result. This is my testing method:
[TestMethod] public void All_ShouldReturnPartialViewCalledStatusFilter() {
source share