diff --git a/Assets/Tests/Runtime/ClientServer/ClientObjectManagerTest.cs b/Assets/Tests/Runtime/ClientServer/ClientObjectManagerTest.cs index 60c74dfbd1..9189b45c74 100644 --- a/Assets/Tests/Runtime/ClientServer/ClientObjectManagerTest.cs +++ b/Assets/Tests/Runtime/ClientServer/ClientObjectManagerTest.cs @@ -106,13 +106,10 @@ public void ThrowsIfPrefabAlreadyRegistered() clientObjectManager.RegisterPrefab(identity); - var exception = Assert.Throws(() => + Assert.DoesNotThrow(() => { clientObjectManager.RegisterSpawnHandler(identity, (msg) => null, (obj) => { }); - }); - - Assert.That(exception, Has.Message.EqualTo($"Prefab with hash {identity.PrefabHash:X} already registered. " + - $"Unregister before adding new or prefabshandlers. Too add Unspawn handler to prefab use RegisterUnspawnHandler instead")); + }, "should not throw if adding handler to prefab that ia already Register"); } [Test]