Add comprehensive backend test suite and helper access

This commit is contained in:
2026-02-05 18:03:50 +01:00
parent 330d87b432
commit 912da11809
11 changed files with 591 additions and 4 deletions

View File

@@ -32,4 +32,15 @@ public class ResultsTests
Assert.Equal("ResultGame", first.GetProperty("name").GetString());
Assert.Equal(8, (int)first.GetProperty("average").GetDouble());
}
[Fact]
public async Task Results_locked_returns_error()
{
using var factory = new TestWebApplicationFactory();
var client = factory.CreateClientWithCookies();
await client.RegisterAsync("user");
await client.PostAsJsonAsync("/api/me/phase/next", new { });
var resp = await client.GetAsync("/api/results");
Assert.Equal(System.Net.HttpStatusCode.BadRequest, resp.StatusCode);
}
}