Skip to content

Instantly share code, notes, and snippets.

@zbartl
Last active June 6, 2017 19:43
Show Gist options
  • Save zbartl/b8133809a9db86c32d3ee9105d8dd4eb to your computer and use it in GitHub Desktop.
Save zbartl/b8133809a9db86c32d3ee9105d8dd4eb to your computer and use it in GitHub Desktop.
aspnetcore integration testing - controller action
[HttpPost]
[Authorize("Client")]
[Route("secret-thing")]
public async Task<IActionResult> SecretAction(SecretThing.Command command)
{
command.LoginId = _userManager.GetUserId(User);
await _mediator.Send(command);
return RedirectToAction("Classified");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment