Adding delete for spawnables

This commit is contained in:
hz
2025-06-08 21:54:57 -05:00
parent 2ed8aaffc6
commit d16ecac876
3 changed files with 38 additions and 0 deletions
@@ -54,4 +54,16 @@ public class SpawnableControllerTests
var ok = Assert.IsType<OkObjectResult>(result);
Assert.Equal(list, ok.Value);
}
[Fact]
public async Task Delete_NotFound()
{
var svc = new Mock<SpawnableService>(config);
svc.Setup(s => s.GetByIdAsync("id")).ReturnsAsync((Spawnable)null);
var controller = new SpawnableController(svc.Object);
var result = await controller.Delete("id");
Assert.IsType<NotFoundObjectResult>(result);
}
}