Esempio n. 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);
 }
Esempio n. 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);
 }