package media

import (
	"strings"
	"testing"

	"github.com/google/uuid"
)

func TestAssetKeysUseControlledSegments(t *testing.T) {
	projectID, assetID, taskID, mediaID := uuid.New(), uuid.New(), uuid.New(), uuid.New()
	key := AssetOutput(projectID, "角色 中文", assetID, taskID, mediaID, "image/webp")
	wantPrefix := "juyou_ran/video-redraw/projects/" + projectID.String() + "/assets/custom/" + assetID.String() + "/outputs/"
	if !strings.HasPrefix(key, wantPrefix) || !strings.HasSuffix(key, ".webp") {
		t.Fatalf("unexpected key: %s", key)
	}
}
