mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
23 lines
464 B
Go
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)
|
|
}
|
|
}
|