Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public ResponseEntity<FileDTO> uploadFeedbackAttachment(

@PreAuthorize("hasAuthority('feedback:request:respond:assigned')")
@DeleteMapping("/{feedbackId}/attachments/{attachmentId}")
public ResponseEntity<Void> deleteAttachment(
public ResponseEntity<Void> deleteFeedbackAttachment(
Principal principal,
@Valid @PathVariable UUID feedbackId,
@Valid @PathVariable UUID attachmentId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ void should_return_204_no_content() {

BddLogger.when("deleteAttachment is called");
ResponseEntity<Void> 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);
Expand All @@ -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);
Expand Down
Loading