diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs index 32e6d3d273..765036eb50 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs @@ -68,7 +68,7 @@ public sealed partial class MindTests [Test] public async Task TestGhostOnDeleteMap() { - await using var pairTracker = await PoolManager.GetServerClient(); + await using var pairTracker = await SetupPair(); var server = pairTracker.Pair.Server; var testMap = await PoolManager.CreateTestMap(pairTracker); var coordinates = testMap.GridCoords; diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs index b3b77451fe..f3fed7ea7b 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs @@ -37,16 +37,17 @@ public sealed partial class MindTests var player = playerMan.ServerSessions.Single(); EntityUid entity = default; + Mind mind = default!; await pair.Server.WaitPost(() => { entity = entMan.SpawnEntity(null, MapCoordinates.Nullspace); - mindSys.TransferTo(mindSys.CreateMind(player.UserId), entity); + mind = mindSys.CreateMind(player.UserId); + mindSys.TransferTo(mind, entity); }); await PoolManager.RunTicksSync(pair, 5); - var mind = player.ContentData()?.Mind; - Assert.NotNull(mind); + Assert.That(player.ContentData()?.Mind, Is.EqualTo(mind)); Assert.That(player.AttachedEntity, Is.EqualTo(entity)); Assert.That(player.AttachedEntity, Is.EqualTo(mind.CurrentEntity), "Player is not attached to the mind's current entity."); Assert.That(entMan.EntityExists(mind.OwnedEntity), "The mind's current entity does not exist");