0.2.84
This commit is contained in:
@@ -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,"+
|
||||
|
||||
Reference in New Issue
Block a user