20 lines
511 B
C#
20 lines
511 B
C#
using System.Net;
|
|
using FluentAssertions;
|
|
using Xunit;
|
|
|
|
namespace backend.tests;
|
|
|
|
public class HealthTests(ApiFactory factory) : IClassFixture<ApiFactory>
|
|
{
|
|
private readonly ApiFactory _factory = factory;
|
|
|
|
[Fact]
|
|
public async Task Health_returns_ok()
|
|
{
|
|
var client = _factory.CreateClient();
|
|
var res = await client.GetAsync("/health");
|
|
res.StatusCode.Should().Be(HttpStatusCode.OK);
|
|
(await res.Content.ReadAsStringAsync()).Should().Contain("\"ok\":true");
|
|
}
|
|
}
|