Big changes
This commit is contained in:
@@ -70,6 +70,23 @@ func TestSearchTextIncludesSeriesNameSoEpisodesAreFindable(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSearchTextIncludesStudiosSoAStudioNameFindsItsTitles(t *testing.T) {
|
||||
text := searchText(syncItem{
|
||||
Name: "Everything Everywhere All at Once",
|
||||
Type: "Movie",
|
||||
Studios: []struct {
|
||||
Name string `json:"Name"`
|
||||
}{{Name: "A24"}, {Name: ""}},
|
||||
})
|
||||
|
||||
if !strings.Contains(text, "A24") {
|
||||
t.Fatalf("search text %q is missing the studio", text)
|
||||
}
|
||||
if strings.Contains(text, " ") {
|
||||
t.Fatalf("an unnamed studio should be skipped, not joined as a gap: %q", text)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSearchTextDoesNotRepeatTheTitleForAMovie(t *testing.T) {
|
||||
text := searchText(syncItem{Name: "Dune", Type: "Movie", SeriesName: "Dune"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user