I've got a controller method which returns a RedirectToActionResult
(success!) or a ViewResult
(failed with error messages).
If the business logic fails, i add the error messages to the AddModelError
property.
Is there any way i can test this in my MS Unit tests? I also have Moq, if that helps too. (i don't believe Moq is required for this scenario though) .. I'm not using anything from the Request
object.
Yep, figured it out.