Skip to content

Commit

Permalink
[backend] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RomuDeuxfois committed Jan 3, 2025
1 parent 8b7b917 commit 78143cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion openbas-api/src/test/java/io/openbas/rest/PlayerApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.springframework.test.web.servlet.MockMvc;

@TestInstance(PER_CLASS)
public class PlayerApiTest extends IntegrationTest {
class PlayerApiTest extends IntegrationTest {

static Tag TAG;
static Organization ORGANIZATION;
Expand Down Expand Up @@ -158,6 +158,9 @@ void given_nonExistingPlayerInput_should_upsertSuccessfully() throws Exception {

// --ASSERT--
assertEquals(PLAYER_FIXTURE_FIRSTNAME, JsonPath.read(response, "$.user_firstname"));

// -- CLEAN --
this.userRepository.deleteById(JsonPath.read(response, "$.user_id"));
}

@DisplayName("Given valid player ID and input, should update player successfully")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
public class PlayerFixture {

public static final String PLAYER_FIXTURE_FIRSTNAME = "Firstname";
public static final String PLAYER_FIXTURE_MAIL = "[email protected]";

public static PlayerInput createPlayerInput() {
PlayerInput player = new PlayerInput();
player.setEmail("[email protected]");
player.setEmail(PLAYER_FIXTURE_MAIL);
player.setFirstname(PLAYER_FIXTURE_FIRSTNAME);
player.setLastname("Lastname");
player.setCountry("France");
Expand Down

0 comments on commit 78143cc

Please sign in to comment.