Show poster thumbnails in the detail panes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,3 +76,24 @@ func TestLoadPermissionWarning(t *testing.T) {
|
||||
t.Fatalf("unexpected warnings: %v", warnings)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShowCovers(t *testing.T) {
|
||||
base := `{"radarr":{"url":"http://r","apikey":"k"},"sonarr":{"url":"http://s","apikey":"k"},"sabnzbd":{"url":"http://a","apikey":"k"}`
|
||||
for _, tc := range []struct {
|
||||
ui string
|
||||
want bool
|
||||
}{
|
||||
{``, true},
|
||||
{`,"ui":{}`, true},
|
||||
{`,"ui":{"covers":true}`, true},
|
||||
{`,"ui":{"covers":false}`, false},
|
||||
} {
|
||||
cfg, err := Parse([]byte(base + tc.ui + `}`))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := cfg.UI.ShowCovers(); got != tc.want {
|
||||
t.Errorf("%q: ShowCovers = %v, want %v", tc.ui, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user