public void Create_ShowsCorrectView()
        {
            var result = Controller.Create();

            Assert.IsType <ViewResult>(result);
            var viewResult = result as ViewResult;

            Assert.Null(viewResult.ViewName);
        }
예제 #2
0
        public void SportSavedAndRedirected()
        {
            //act
            var result = (RedirectToRouteResult)controller.Create(sports[0]);

            //assert
            Assert.AreEqual("Index", result.RouteValues["action"]);
        }