MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestBuildImageInsertRequests_MissingURL

Function TestBuildImageInsertRequests_MissingURL

internal/cmd/docs_import_test.go:708–720  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

706}
707
708func TestBuildImageInsertRequests_MissingURL(t *testing.T) {
709 // Placeholder found but image URL was not resolved
710 img := markdownImage{index: 0, alt: "photo", originalRef: "local.png", token: "test"}
711 placeholders := map[string]docRange{
712 "<<IMG_test_0>>": {startIndex: 10, endIndex: 19},
713 }
714 imageURLs := map[int]string{} // empty — URL not resolved
715
716 reqs := buildImageInsertRequests(placeholders, []markdownImage{img}, imageURLs, "")
717 if len(reqs) != 0 {
718 t.Fatalf("expected 0 requests when URL missing, got %d", len(reqs))
719 }
720}
721
722func TestBuildImageInsertRequests_PartialMissing(t *testing.T) {
723 // Two images: one has both placeholder and URL, other is missing URL

Callers

nothing calls this directly

Calls 1

buildImageInsertRequestsFunction · 0.85

Tested by

no test coverage detected