예제 #1
0
 public void Should_set_status_code()
 {
     var result = new PermanentRedirectToActionResult("action", "controller", new { id = 1 });
     result.ExecuteResult(_controllerContext);
     Assert.AreEqual(301, _controllerContext.HttpContext.Response.StatusCode);
 }
예제 #2
0
 public void Should_set_redirect_location()
 {
     var result = new PermanentRedirectToActionResult("action", "controller", new { id = 1 });
     result.ExecuteResult(_controllerContext);
     Assert.IsNotNull(_controllerContext.HttpContext.Response.RedirectLocation);
 }