package goods_media_add

import (
	"ai_scheduler/internal/config"
	"context"
	"fmt"
	"testing"
)

// Test_Call
func Test_Call(t *testing.T) {
	req := &GoodsMediaAddRequest{
		GoodsId: 8496,
		Data: []MediaItem{
			{
				Type: 1,
				Url:  "https://lsxd-hz-store.oss-cn-hangzhou.aliyuncs.com/physicalGoodsSystems/images/goodsimages/goods/22f03d91-3cb7-45b4-ab92-07aad78a1633-screenshot_2025-12-17_17-46-00.png",
				Sort: 1,
			},
		},
		IsCover: true,
	}

	cfg := config.ToolConfig{
		BaseURL: "https://gateway.dev.cdlsxd.cn/goods-admin/api/v1/media/add/batch",
	}

	client := New(cfg)
	toolResp, err := client.Call(context.Background(), req)

	if err != nil {
		t.Errorf("Call() error = %v", err)
		return
	}

	fmt.Printf("toolResp: %v\n", toolResp)
}
