Example #1
0
        public void Logout_ReturnsCorrectActionType_RedirectToActionResult()
        {
            BlogsController controller = new BlogsController();
            IActionResult   view       = controller.Logout();

            Assert.IsInstanceOfType(view, typeof(RedirectToActionResult));
        }
Example #2
0
        public void Logout_RedirectsToCorrectAction_IndexHome()
        {
            BlogsController        controller   = new BlogsController();
            RedirectToActionResult actionResult = controller.Logout() as RedirectToActionResult;
            string result = actionResult.ActionName;

            Assert.AreEqual(result, "Index", "Home");
        }