This commit is contained in:
33333-33333 2026-06-03 18:47:09 +09:00
commit 06ab438d7b
13 changed files with 1167 additions and 3747 deletions

View file

@ -119,6 +119,18 @@ class WorldPolicyTest(unittest.TestCase):
self.assertIn("obj-a", state["tombstones"]["objects"])
self.assertEqual(len(state["dynamicSummons"]), 1)
def test_non_owner_can_delete_asset_and_all_placements(self):
state = base_state()
allowed, _ = can_delete_asset(state, {"id": "alice"}, "asset-b")
self.assertTrue(allowed)
result = apply_command(state, {"id": "alice"}, {"type": "asset.delete", "assetId": "asset-b"}, at=100)
self.assertTrue(result["accepted"])
self.assertTrue(apply_server_event(state, result["event"]))
self.assertNotIn("asset-b", [asset["id"] for asset in state["assets"]])
self.assertEqual(state["dynamicSummons"], [])
self.assertIn("asset-b", state["tombstones"]["assets"])
self.assertIn("dyn-b", state["tombstones"]["objects"])
def test_world_phase_event_updates_authoritative_clock(self):
state = base_state()