public ActionResult Edit(CreateHeartbeatInput input) { return(Command <CreateHeartbeatInput, object>(input, r => RedirectToAction <HeartbeatController>(c => c.Index()), i => View(input) )); }
public void should_save_new_heartbeat() { var form = new CreateHeartbeatInput { Message = "Howdy" }; var controller = new HeartbeatController(null, null); var result = (CommandResult)controller.Edit(form); result.Success.AssertActionRedirect().ToAction <HeartbeatController>(a => a.Index()); }