fix tests of basket
This commit is contained in:
parent
a29a34fe27
commit
977e6ce8e2
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user