public async Task ThenItShouldReturnAValidModelIfReturnUrlValidForClientId(string requestedClientId, string requestedReturnUrl)
        {
            // Act
            var actual = await _orchestrator.StartRequestChangeEmail(requestedClientId, requestedReturnUrl);

            // Assert
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Data.Valid);
        }
Beispiel #2
0
        public async Task <ActionResult> ChangeEmail(string clientId, string returnUrl)
        {
            if (string.IsNullOrEmpty(clientId))
            {
                clientId  = _owinWrapper.GetIdsClientId();
                returnUrl = _owinWrapper.GetIdsReturnUrl();
            }
            var model = await _accountOrchestrator.StartRequestChangeEmail(clientId, returnUrl);

            //if (!model.Data.Valid)
            //{
            //    return new HttpStatusCodeResult((int)HttpStatusCode.BadRequest);
            //}
            return(View(model));
        }