Path: redb-identity/tests/redb.Identity.Web.Tests/HealthEndpointTests.cs Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity Page: https://redbase.app/src/dev-2026-12-06/redb-identity/tests/redb.Identity.Web.Tests/HealthEndpointTests.cs ---- using System.Net; using System.Net.Http; using AwesomeAssertions; using Xunit; namespace redb.Identity.Web.Tests; public sealed class HealthEndpointTests : IClassFixture { private readonly WebHostFixture _factory; public HealthEndpointTests(WebHostFixture factory) { _factory = factory; } [Fact] public async Task Get_health_returns_200_with_status_ok() { var client = _factory.CreateClient(); var resp = await client.GetAsync("/health"); resp.StatusCode.Should().Be(HttpStatusCode.OK); var body = await resp.Content.ReadAsStringAsync(); body.Should().Contain("\"status\""); body.Should().Contain("ok"); } [Fact] public async Task Get_health_is_anonymous_no_redirect_to_login() { var opts = new HttpClientHandler { AllowAutoRedirect = false }; var client = _factory.CreateDefaultClient(new Uri("http://localhost")); var resp = await client.GetAsync("/health"); resp.StatusCode.Should().Be(HttpStatusCode.OK); } }