Lobby: include HostUserId in GameStateDto and let client derive host status; update tests
Some checks failed
Build / build (pull_request) Failing after 1m0s
Some checks failed
Build / build (pull_request) Failing after 1m0s
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user