Adding update endpoint for location, player, spawnable, and user
This commit is contained in:
@@ -61,6 +61,21 @@ public class PlayerControllerTests
|
||||
Assert.IsType<NotFoundObjectResult>(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Update_PlayerNotFound()
|
||||
{
|
||||
var svc = new Mock<PlayerService>(cfg);
|
||||
svc.Setup(p => p.GetByUserIdAsync("u")).ReturnsAsync((Player?)null);
|
||||
var controller = new PlayerController(svc.Object, new Mock<LocationService>(cfg).Object, new Mock<SpawnableService>(cfg).Object, new Mock<ItemService>(cfg).Object)
|
||||
{
|
||||
ControllerContext = ContextWithUser("u")
|
||||
};
|
||||
|
||||
var result = await controller.Update(new UpdatePlayerRequest { Name="n", Climbing=1 });
|
||||
|
||||
Assert.IsType<NotFoundObjectResult>(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AdminTeleport_PlayerNotFound()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user