From 48d52261ab5d8ff4068f15c1c2bd150a784e7ffc Mon Sep 17 00:00:00 2001 From: kelrhourha Date: Wed, 19 Aug 2026 18:56:11 +0200 Subject: [PATCH] fix(feedbacks): rename deleteAttachment operation --- .../application/adapter/controller/FeedbackController.java | 2 +- .../adapter/controller/FeedbackControllerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);