1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:03:10 +08:00

Implement IsHost to return correct value for current state

This commit is contained in:
Dean Herbert 2022-04-13 20:51:05 +09:00
parent 4b6a9fbf47
commit 8a7b37856c

View File

@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
multiplayerClient.SetupGet(m => m.Room).Returns(() => multiplayerRoom);
// By default, the local user is to be the host.
multiplayerClient.SetupGet(m => m.IsHost).Returns(true);
multiplayerClient.SetupGet(m => m.IsHost).Returns(() => ReferenceEquals(multiplayerRoom.Host, localUser));
// Assume all state changes are accepted by the server.
multiplayerClient.Setup(m => m.ChangeState(It.IsAny<MultiplayerUserState>()))