diff --git a/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/StepDefinitions/TokensStepDefinitions.cs b/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/StepDefinitions/TokensStepDefinitions.cs index 54f5ba92e2..3eb3aa8643 100644 --- a/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/StepDefinitions/TokensStepDefinitions.cs +++ b/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/StepDefinitions/TokensStepDefinitions.cs @@ -135,15 +135,10 @@ public async Task WhenIdentitySendsAGetRequestToTheTokensIdEndpointWithPassword( [When($@"{RegexFor.OPTIONAL_SINGLE_THING} sends a GET request to the /Tokens/{RegexFor.SINGLE_THING}.Id endpoint")] public async Task WhenIdentitySendsAGetRequestToTheTokensIdEndpoint(string identityName, string tokenName) { - var isAuthenticated = identityName != "-"; - - var client = isAuthenticated ? _clientPool.FirstForIdentityName(identityName) : _clientPool.Anonymous; + var client = _clientPool.FirstForIdentityName(identityName); var tokenId = _tokensContext.CreateTokenResponses[tokenName].Id; - if (isAuthenticated) - _responseContext.WhenResponse = await client.Tokens.GetToken(tokenId); - else - _responseContext.WhenResponse = await client.Tokens.GetTokenUnauthenticated(tokenId); + _responseContext.WhenResponse = await client.Tokens.GetToken(tokenId); } [When($@"{RegexFor.SINGLE_THING} sends a GET request to the /Tokens endpoint with the following payloads")]