Example #1
0
        public void should_not_handle_request_when_content_type_requested_does_not_contain_html()
        {
            Headers.Add("Accept", "application/json");

            var handler = new HtmlHandler();
            handler.CanHandle(HttpContext).ShouldBeFalse();
        }
Example #2
0
        public void should_Handle_request_when_content_type_requested_contains_html()
        {
            Headers.Add("Accept", "text/html");

            var handler = new HtmlHandler();
            handler.CanHandle(HttpContext).ShouldBeTrue();
        }
Example #3
0
 public void should_return_a_ViewResult()
 {
     var handler = new HtmlHandler();
     var result = handler.ResultWith("whatever");
     result.ShouldBeType<ViewResult>();
 }