From a47db6d8436554e012dc85f1fc4f92bc1f2ea62f Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 17 Apr 2024 16:37:24 +0100 Subject: [PATCH] fix tests --- .../java/xyz/mcutils/backend/tests/PlayerControllerTests.java | 4 ++-- .../java/xyz/mcutils/backend/tests/ServerControllerTests.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java b/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java index 19f68b3..4726593 100644 --- a/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java +++ b/src/test/java/xyz/mcutils/backend/tests/PlayerControllerTests.java @@ -30,7 +30,7 @@ class PlayerControllerTests { .accept(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) - .andExpect(jsonPath("$.player.username").value(testPlayer)); + .andExpect(jsonPath("$.username").value(testPlayer)); } @Test @@ -39,7 +39,7 @@ class PlayerControllerTests { .accept(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) - .andExpect(jsonPath("$.player.username").value(testPlayer)); + .andExpect(jsonPath("$.username").value(testPlayer)); } @Test diff --git a/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java b/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java index 6177f91..1fa3227 100644 --- a/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java +++ b/src/test/java/xyz/mcutils/backend/tests/ServerControllerTests.java @@ -28,7 +28,7 @@ class ServerControllerTests { .accept(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) - .andExpect(jsonPath("$.server.hostname").value(testServer)); + .andExpect(jsonPath("$.hostname").value(testServer)); } @Test