test: automate overseas wallet and pallet cost closure
This commit is contained in:
+5
@@ -7,6 +7,11 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
class DestuffingPalletCostServiceTest {
|
||||
@Test void newestCompletedBookingsAreNotStarvedByOldUnbillableRows() {
|
||||
assertThat(DestuffingPalletCostService.READY_BOOKINGS_SQL)
|
||||
.contains("ORDER BY MAX(t.completed_at) DESC LIMIT 50")
|
||||
.doesNotContain("ORDER BY MIN(t.completed_at)");
|
||||
}
|
||||
@Test void preservesTotalAndLetsFinalCustomerAbsorbRoundingRemainder() {
|
||||
List<BigDecimal> result = DestuffingPalletCostService.allocate(new BigDecimal("10.00"),
|
||||
List.of(new BigDecimal("1"), new BigDecimal("1"), new BigDecimal("1")));
|
||||
|
||||
Reference in New Issue
Block a user