mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 15:55:44 +00:00
fix: DTO mismatch marketings
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user