I have 2 routes registered as follows:
routes.MapRoute("GetAnEmail", "{controller}", new { controller = "Home", action = "GetAnEmail" }, new { httpMethod = new HttpMethodConstraint("POST") })
routes.MapRoute("Home", "{controller}/{action}", new { controller = "Home", action = "Index" })
I have a valid unit test for the Home controller as follows:
[Test]
public void CanVerifyRouteMaps()
{
"~/".Route().ShouldMapTo<HomeController>(x => x.Index());
}
I know GetAnEmail works, but how does one unit test a POSTed route?