add username to uuid lookup test
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m31s

This commit is contained in:
Lee 2024-04-11 00:24:03 +01:00
parent a3b9cb5e77
commit 4a9149e41e

@ -42,6 +42,16 @@ class PlayerControllerTests {
.andExpect(jsonPath("$.username").value(testPlayer)); .andExpect(jsonPath("$.username").value(testPlayer));
} }
@Test
public void ensurePlayerUsernameToUuidLookupSuccess() throws Exception {
mockMvc.perform(get("/player/uuid/" + testPlayer)
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.username").value(testPlayer))
.andExpect(jsonPath("$.uuid").value(testPlayerUuid));
}
@Test @Test
public void ensurePlayerLookupFailure() throws Exception { public void ensurePlayerLookupFailure() throws Exception {
mockMvc.perform(get("/player/" + testInvalidPlayer) mockMvc.perform(get("/player/" + testInvalidPlayer)