fix: keep terminal drayage actions executable
This commit is contained in:
+13
@@ -154,6 +154,19 @@ class TerminalDrayageServiceTest {
|
||||
assertThat(service.detail(11L).emptyReturnWarning().overdueHours()).isZero();
|
||||
}
|
||||
|
||||
@Test
|
||||
void doesNotOfferEmptyReturnWithoutExecutableDrayageAggregate() {
|
||||
LocalDateTime unloadedAt = LocalDateTime.of(2026, 9, 3, 0, 0);
|
||||
Context context = context("PICKED_UP", unloadedAt);
|
||||
when(mapper.context(11L)).thenReturn(context);
|
||||
when(mapper.find(11L)).thenReturn(null);
|
||||
|
||||
var result = service.detail(11L);
|
||||
|
||||
assertThat(result.status()).isEqualTo("UNLOADED");
|
||||
assertThat(result.allowedActions()).doesNotContain("RECORD_EMPTY_RETURN");
|
||||
}
|
||||
|
||||
@Test
|
||||
void sameIdempotencyKeyWithDifferentPayloadConflictsWithoutWriting() {
|
||||
Context context = context("ARRIVED_DESTINATION_PORT", null);
|
||||
|
||||
Reference in New Issue
Block a user