Expand Artgrid query coverage to artlist canonical URLs
build-push / docker (push) Successful in 4m23s
build-push / docker (push) Successful in 4m23s
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package services
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestExtractVideoPreviewURLFindsEnvatoPreview(t *testing.T) {
|
||||
html := `<script type="application/ld+json">{"contentUrl":"https://video-previews.elements.envatousercontent.com/ad0a3abc-7eb0-4075-8f68-8198f9a08777/watermarked_preview/watermarked_preview.mp4"}</script>`
|
||||
@@ -64,6 +67,20 @@ func TestIsRenderableArtgridResultAcceptsArtlistCanonical(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildArtgridQueriesIncludesArtlistCanonicalDomain(t *testing.T) {
|
||||
queries := buildArtgridQueries("friendly couple")
|
||||
found := false
|
||||
for _, query := range queries {
|
||||
if strings.Contains(query, "site:artlist.io/stock-footage/clip/") {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Fatal("expected Artgrid queries to include artlist canonical domain")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGeminiCandidateLimitNeverExceedsCandidates(t *testing.T) {
|
||||
if got := GeminiCandidateLimit(9); got != 9 {
|
||||
t.Fatalf("expected Gemini limit to stay within candidate count, got %d", got)
|
||||
|
||||
Reference in New Issue
Block a user