Files
lti-api/internal/modules/marketing/dto/deliveryorder.dto_test.go
2026-04-22 11:41:27 +07:00

23 lines
464 B
Go

package dto
import (
"testing"
entity "gitlab.com/mbugroup/lti-api.git/internal/entities"
)
func TestToMarketingDeliveryProductDTOIncludesPendingQty(t *testing.T) {
input := entity.MarketingDeliveryProduct{
Id: 1,
MarketingProductId: 42,
UsageQty: 15,
PendingQty: 5,
}
got := ToMarketingDeliveryProductDTO(input)
if got.Qty != 20 {
t.Fatalf("expected qty to include pending quantity, got %.2f", got.Qty)
}
}