(t *testing.T)
| 706 | } |
| 707 | |
| 708 | func 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 | |
| 722 | func TestBuildImageInsertRequests_PartialMissing(t *testing.T) { |
| 723 | // Two images: one has both placeholder and URL, other is missing URL |
nothing calls this directly
no test coverage detected