public void Logout_ReturnsCorrectActionType_RedirectToActionResult() { BlogsController controller = new BlogsController(); IActionResult view = controller.Logout(); Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Logout_RedirectsToCorrectAction_IndexHome() { BlogsController controller = new BlogsController(); RedirectToActionResult actionResult = controller.Logout() as RedirectToActionResult; string result = actionResult.ActionName; Assert.AreEqual(result, "Index", "Home"); }