This commit is contained in:
ponzischeme89
2026-08-21 09:54:44 +12:00
parent f1164db2c5
commit 5467fba0eb
39 changed files with 7589 additions and 5537 deletions
+14
View File
@@ -61,6 +61,20 @@ func TestGenreBrowserIsServerControlledAndOffByDefault(t *testing.T) {
}
}
func TestContinueWatchingIsServerControlledAndOnByDefault(t *testing.T) {
definition, ok := knownFeature(featureContinueWatching)
if !ok || definition.Area != "Home" {
t.Fatalf("Continue Watching feature definition = %+v, found=%v", definition, ok)
}
if got := evaluateFeature(store.DefaultFeaturePolicy(), definition, ProtocolVersion); !got.Enabled {
t.Fatalf("Continue Watching default = %+v, want enabled", got)
}
disabled := store.FeaturePolicy{Overrides: map[string]bool{featureContinueWatching: false}}
if got := evaluateFeature(disabled, definition, ProtocolVersion); got.Enabled || got.Source != "override" {
t.Fatalf("Continue Watching override = %+v", got)
}
}
func TestClientCapabilitiesAreNormalizedAndBounded(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/v1/status", nil)
req.Header.Set("X-Memby-Capabilities", " Sonarr_Preroll_V1,server_features_v1,sonarr_preroll_v1,"+