diff --git a/src/main/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackController.java b/src/main/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackController.java index 76e32ecd8..c267219e0 100644 --- a/src/main/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackController.java +++ b/src/main/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackController.java @@ -199,7 +199,7 @@ public ResponseEntity uploadFeedbackAttachment( @PreAuthorize("hasAuthority('feedback:request:respond:assigned')") @DeleteMapping("/{feedbackId}/attachments/{attachmentId}") - public ResponseEntity deleteAttachment( + public ResponseEntity deleteFeedbackAttachment( Principal principal, @Valid @PathVariable UUID feedbackId, @Valid @PathVariable UUID attachmentId) { diff --git a/src/test/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackControllerTest.java b/src/test/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackControllerTest.java index 32ec0c1a9..cfa9c34fd 100644 --- a/src/test/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackControllerTest.java +++ b/src/test/java/fr/avenirsesr/portfolio/student/activity/application/adapter/controller/FeedbackControllerTest.java @@ -662,7 +662,7 @@ void should_return_204_no_content() { BddLogger.when("deleteAttachment is called"); ResponseEntity response = - controller.deleteAttachment(principal, feedbackId, attachmentId); + controller.deleteFeedbackAttachment(principal, feedbackId, attachmentId); BddLogger.then("204 No Content is returned with no body"); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT); @@ -679,7 +679,7 @@ void should_delegate_to_service_with_correct_feedback_and_attachment_ids() { UUID attachmentId = UUID.randomUUID(); BddLogger.when("deleteAttachment is called"); - controller.deleteAttachment(principal, feedbackId, attachmentId); + controller.deleteFeedbackAttachment(principal, feedbackId, attachmentId); BddLogger.then("The service is called exactly once with both IDs"); verify(feedbackService, times(1)).deleteAttachment(feedbackId, attachmentId);