fix tests of basket

This commit is contained in:
ericuss 2019-09-05 13:06:40 +02:00
parent a29a34fe27
commit 977e6ce8e2
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
return BadRequest();
}
var userName = User.FindFirst(x => x.Type == ClaimTypes.Name).Value;
var userName = this.HttpContext.User.FindFirst(x => x.Type == ClaimTypes.Name).Value;
var eventMessage = new UserCheckoutAcceptedIntegrationEvent(userId, userName, basketCheckout.City, basketCheckout.Street,
basketCheckout.State, basketCheckout.Country, basketCheckout.ZipCode, basketCheckout.CardNumber, basketCheckout.CardHolderName,

View File

@ -21,6 +21,7 @@ namespace Basket.FunctionalTests.Base
identity.AddClaim(new Claim("sub", IDENTITY_ID));
identity.AddClaim(new Claim("unique_name", IDENTITY_ID));
identity.AddClaim(new Claim(ClaimTypes.Name, IDENTITY_ID));
httpContext.User.AddIdentity(identity);