This commit is contained in:
@@ -49,3 +49,17 @@ func TestCleanArtgridTitle(t *testing.T) {
|
||||
t.Fatalf("expected %q, got %q", want, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCanonicalizeArtgridLinkFromArtlist(t *testing.T) {
|
||||
got := canonicalizeArtgridLink("https://artlist.io/stock-footage/clip/movie-film-moving-slowly-from-a-reel/114756")
|
||||
want := "https://artgrid.io/clip/114756/movie-film-moving-slowly-from-a-reel"
|
||||
if got != want {
|
||||
t.Fatalf("expected %q, got %q", want, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsRenderableArtgridResultAcceptsArtlistCanonical(t *testing.T) {
|
||||
if !isRenderableArtgridResult(SearchResult{Link: "https://artlist.io/stock-footage/clip/movie-film-moving-slowly-from-a-reel/114756"}) {
|
||||
t.Fatal("expected artlist canonical clip URL to be accepted for Artgrid collector")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user