// Something in DynamicHttpContextBase prevents UrlHelper.Action from ever
        // returning anything but null.
        public void Should_set_redirect_location()
        {
            var result = new PermanentRedirectToActionResult("action", "controller", new { id = 1 });

            result.ExecuteResult(_controllerContext);
            Assert.IsNotNull(_controllerContext.HttpContext.Response.RedirectLocation);
        }
        public void RouteValues_should_return_the_route_values()
        {
            var routeValues = new { id = 1 };
            var result      = new PermanentRedirectToActionResult("action", "controller", routeValues);

            Assert.AreEqual(routeValues, result.RouteValues);
        }
        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);
        }
        public void ControllerName_should_return_the_controller_name()
        {
            var result = new PermanentRedirectToActionResult("action", "controller", new { id = 1 });

            Assert.AreEqual("controller", result.ControllerName);
        }