public async Task ThenItShouldReturnAValidModelIfNoProblems() { // Act var actual = await _orchestrator.ConfirmChangeEmail(_model); // Assert Assert.IsNotNull(actual); Assert.IsTrue(actual.Valid); }
public async Task <ActionResult> ConfirmChangeEmail(ConfirmChangeEmailViewModel model) { model.UserId = GetLoggedInUserId(); model = await _accountOrchestrator.ConfirmChangeEmail(model); if (model.Valid) { return(Redirect(model.ReturnUrl)); } model.SecurityCode = string.Empty; model.Password = string.Empty; return(View(new OrchestratorResponse <ConfirmChangeEmailViewModel>() { Data = model })); }