mirror of
https://ids-dev.idsbuybuybuy.com/ids-ecommerce/ids-svc-product.git
synced 2026-11-29 16:57:41 +08:00
18 lines
504 B
Go
18 lines
504 B
Go
package server
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"llms.idsbuybuybuy.com/ecommerce/ids-svc-product/internal/repository"
|
|
)
|
|
|
|
func TestCartProductIncludesFreightConfiguration(t *testing.T) {
|
|
got := toProtoCartItemProduct("801", repository.CartItemProductRecord{
|
|
ProductID: "1001", SKUID: "1101",
|
|
Product: &repository.ProductRecord{FreightChargeType: 2, FreightTemplateID: "9001"},
|
|
})
|
|
if got.GetFreightChargeType() != 2 || got.GetFreightTemplateId() != "9001" {
|
|
t.Fatalf("cart product freight = %#v", got)
|
|
}
|
|
}
|