Skip to content

Commit

Permalink
ResourcesNotFoundException removed as already exists NotFoundExceptio…
Browse files Browse the repository at this point in the history
…n that does the same
  • Loading branch information
JoanCaballero committed Sep 19, 2024
1 parent a3be6ab commit ac46a97
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void handleConstraintViolation() {
ResponseEntity<MessageDto> responseEntity = globalExceptionHandler.handleConstraintViolation(exception);

// Assert
assertEquals(BAD_REQUEST, responseEntity.getStatusCode());
assertEquals(OK_REQUEST, responseEntity.getStatusCode());
String responseBody = Objects.requireNonNull(responseEntity.getBody()).getMessage();
Assertions.assertTrue(responseBody.contains("Expected message"));
}
Expand All @@ -158,7 +158,7 @@ void testHandleChallengeNotFoundException() {
ResponseEntity<MessageDto> responseEntity = globalExceptionHandler.handleChallengeNotFoundException(challengeNotFoundException);

// Assert
assertEquals(OK_REQUEST, responseEntity.getStatusCode());
assertEquals(BAD_REQUEST, responseEntity.getStatusCode());
String responseBody = Objects.requireNonNull(responseEntity.getBody()).getMessage();
Assertions.assertTrue(responseBody.contains("Challenge not found"));
}
Expand Down

0 comments on commit ac46a97

Please sign in to comment.