title: How to test that an MVC action is only accessible via HTTP POST?
body: <p>I am using MvcContrib-TestHelper to test the routing on my app. I have an action which is restricted to HTTP POST only:</p>
  
  <pre>
  public TestController
  {
      [HttpPost]
      public ActionResult Example()
      {
          return View();
      }
  }
  </pre>
  
  <p>And here is an example of a test that should fail:</p>
  
  <pre>
  [TestFixture]
  public class RoutingTests
  {
      [TestFixtureSetUp]
      public void TestFixtureSetUp()
      {
          RouteTable.Routes.Clear();
          Application.RegisterRoutes(RouteTable.Routes);
      }
  
      [Test]
      public void TestWithGet()
      {
          var route = "~/Test/Example".WithMethod(HttpVerbs.Get);
          route.ShouldMapTo(r => r.Example());
      }
  }
  </pre>
  
  <p>However, the test passes! I've seen one other unanswered question (sorry, wrong link) where this was also raised, and it seems like the functionality is broken. What's a better way to test that this route is accessible via POST only?</p>