Files
Rafał Tyński 1cbf965657 test(backend): add xUnit tests for the API skeleton
Add tests/TarninaHub.Tests with health controller and SurrealDB endpoint builder tests, and register the test and layer projects in the solution.
2026-10-04 01:49:56 +02:00

20 lines
475 B
C#

using Microsoft.AspNetCore.Mvc;
using TarninaHub.Controllers;
namespace TarninaHub.Tests.Controllers;
public class HealthControllerTests
{
[Fact]
public void Get_ReturnsOkWithHealthyStatus()
{
var controller = new HealthController();
var result = controller.Get();
var ok = Assert.IsType<OkObjectResult>(result.Result);
var payload = Assert.IsType<HealthResponse>(ok.Value);
Assert.Equal("ok", payload.Status);
}
}