This commit is contained in:
vis2k 2021-08-01 14:48:05 +08:00
parent 0d2733c564
commit b495eaa965

View File

@ -337,11 +337,12 @@ public void Destroy_HostMode_CallsOnStopAuthority()
// need to have authority for this test
Assert.That(player.hasAuthority, Is.True);
// destroy should call OnStopAuthority
// // ignore 'Destroy called in Edit mode' error
// destroy and ignore 'Destroy called in Edit mode' error
LogAssert.ignoreFailingMessages = true;
NetworkServer.Destroy(player.gameObject);
LogAssert.ignoreFailingMessages = false;
// destroy should call OnStopAuthority
Assert.That(comp.called, Is.EqualTo(1));
}