public void Create_ReturnsCorrectActionType_RedirectToActionResult() { //Arrange PackerTrackerController controller = new PackerTrackerController(); //Act IActionResult view = controller.Create("tent"); //Assert Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Create_RedirectsToCorrectAction_Index() { //Arrange PackerTrackerController controller = new PackerTrackerController(); RedirectToActionResult actionResult = controller.Create("tent") as RedirectToActionResult; //Act string result = actionResult.ActionName; //Assert Assert.AreEqual(result, "Index"); }