diff --git a/test/Identity.IntegrationTest/Endpoints/IdentityServerSsoTests.cs b/test/Identity.IntegrationTest/Endpoints/IdentityServerSsoTests.cs index 0ef761a112..010ac70d27 100644 --- a/test/Identity.IntegrationTest/Endpoints/IdentityServerSsoTests.cs +++ b/test/Identity.IntegrationTest/Endpoints/IdentityServerSsoTests.cs @@ -612,6 +612,9 @@ public class IdentityServerSsoTests Assert.Fail(message); } + // Only calls that result in a 200 OK should call this helper + Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode); + return await AssertHelper.AssertResponseTypeIs(context); } @@ -645,10 +648,8 @@ public class IdentityServerSsoTests factory.SubstituteService(service => { // Return our pre-built authorization code regardless of handle representation - service.GetAuthorizationCodeAsync(Arg.Any()) + service.GetAuthorizationCodeAsync("test_code") .Returns(authorizationCode); - service.RemoveAuthorizationCodeAsync(Arg.Any()) - .Returns(Task.CompletedTask); }); var user = await factory.RegisterNewIdentityFactoryUserAsync(