1
0
mirror of https://github.com/bitwarden/server synced 2026-01-02 08:33:48 +00:00

fix(auth-validator): [PM-22975] Client Version Validator - Changed some minor things in identity server sso tests.

This commit is contained in:
Patrick Pimentel
2025-12-02 16:59:52 -05:00
parent aa4f8ab96e
commit 86bca81644

View File

@@ -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<JsonDocument>(context);
}
@@ -645,10 +648,8 @@ public class IdentityServerSsoTests
factory.SubstituteService<IAuthorizationCodeStore>(service =>
{
// Return our pre-built authorization code regardless of handle representation
service.GetAuthorizationCodeAsync(Arg.Any<string>())
service.GetAuthorizationCodeAsync("test_code")
.Returns(authorizationCode);
service.RemoveAuthorizationCodeAsync(Arg.Any<string>())
.Returns(Task.CompletedTask);
});
var user = await factory.RegisterNewIdentityFactoryUserAsync(