|
@ -118,4 +118,19 @@ class ServerAppTest |
|
|
assertEquals(200, res.getStatus()); |
|
|
assertEquals(200, res.getStatus()); |
|
|
then(accessController).should().deletePlayer(any(), any()); |
|
|
then(accessController).should().deletePlayer(any(), any()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void updateUser() throws IOException |
|
|
|
|
|
{ |
|
|
|
|
|
when(userController.updateUser(any(), any())).thenReturn(mock(Response.class)); |
|
|
|
|
|
|
|
|
|
|
|
String url = "/users"; |
|
|
|
|
|
|
|
|
|
|
|
ApiTestUtils.TestResponse<String> res = new ApiTestUtils<String>() |
|
|
|
|
|
.request("POST", url, null, null, String.class); |
|
|
|
|
|
|
|
|
|
|
|
assertNotNull(res); |
|
|
|
|
|
assertEquals(200, res.getStatus()); |
|
|
|
|
|
then(userController).should().updateUser(any(), any()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |