Lobby: include HostUserId in GameStateDto and let client derive host status; update tests
Some checks failed
Build / build (pull_request) Failing after 1m0s

This commit is contained in:
Tim Krampitz
2026-10-03 22:29:33 +02:00
parent fa999da741
commit 2d0687a083
5 changed files with 27 additions and 3 deletions

View File

@@ -40,6 +40,18 @@ public class GameServiceTests
await Assert.ThrowsAsync<InvalidOperationException>(() => _sut.CreateGameAsync(999));
}
[Fact]
public async Task GetGameStateAsync_IncludesHostUserId()
{
using var db = _factory.CreateDbContext();
var host = TestDbHelper.SeedUser(db);
var (game, _) = TestDbHelper.SeedGame(db, host);
var dto = await _sut.GetGameStateAsync(game.Id);
Assert.Equal(game.HostId, dto.HostUserId);
}
// ---------- JoinGameAsync ----------
[Fact]