This commit is contained in:
@@ -118,15 +118,19 @@ func TestGeminiExpansionCacheRoundTrip(t *testing.T) {
|
||||
|
||||
func TestDecorateRecommendationMediaUsesEmbedForGoogleVideo(t *testing.T) {
|
||||
item := DecorateRecommendationMedia(AIRecommendation{
|
||||
Source: "Google Video",
|
||||
Link: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
||||
Source: "Google Video",
|
||||
Link: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
||||
ThumbnailURL: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
|
||||
})
|
||||
if item.MediaMode != "embed" {
|
||||
t.Fatalf("expected embed media mode, got %q", item.MediaMode)
|
||||
if item.MediaMode != "thumbnail" {
|
||||
t.Fatalf("expected thumbnail media mode, got %q", item.MediaMode)
|
||||
}
|
||||
if item.EmbedURL == "" || !strings.Contains(item.EmbedURL, "youtube-nocookie.com/embed/") {
|
||||
t.Fatalf("unexpected embed url: %q", item.EmbedURL)
|
||||
}
|
||||
if item.ActionType != "download" || item.ActionLabel != "Direct Download" {
|
||||
t.Fatalf("unexpected Google Video actions: %#v", item)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRankSearchResultsPrefersUsableVisuals(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user