refactor(transcription): split reorderBlocks for command-query separation
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m46s
CI / Backend Unit Tests (push) Failing after 2m26s
CI / E2E Tests (push) Has started running
CI / Unit & Component Tests (pull_request) Failing after 1m11s
CI / Backend Unit Tests (pull_request) Failing after 2m24s
CI / E2E Tests (pull_request) Failing after 1h25m31s
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m46s
CI / Backend Unit Tests (push) Failing after 2m26s
CI / E2E Tests (push) Has started running
CI / Unit & Component Tests (pull_request) Failing after 1m11s
CI / Backend Unit Tests (pull_request) Failing after 2m24s
CI / E2E Tests (pull_request) Failing after 1h25m31s
TranscriptionService.reorderBlocks() now returns void (command). Controller calls listBlocks() separately after reorder (query). Updated test to match new void signature. Fixes @Felix: "reorderBlocks violates command-query separation" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -184,7 +184,6 @@ class TranscriptionServiceTest {
|
||||
when(blockRepository.findByIdAndDocumentId(id2, docId)).thenReturn(Optional.of(block2));
|
||||
when(blockRepository.findByIdAndDocumentId(id1, docId)).thenReturn(Optional.of(block1));
|
||||
when(blockRepository.save(any())).thenAnswer(inv -> inv.getArgument(0));
|
||||
when(blockRepository.findByDocumentIdOrderBySortOrderAsc(docId)).thenReturn(List.of(block2, block1));
|
||||
|
||||
ReorderTranscriptionBlocksDTO dto = new ReorderTranscriptionBlocksDTO(List.of(id2, id1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user