Files
memby/server/internal/api/episode_metadata_test.go
ponzischeme89andClaude Opus 5 4a4df7a73c App v0.2.26 and gateway 0.1.20
Client: seek controls, Bazarr subtitle download and cast panel in the
player; MDBList ratings strip; episode and schedule detail pages; series
pace estimate; what's new panel; install-permission onboarding step;
synced per-profile preferences; Emby outage banner.

Gateway: rebuilt admin console (one fragment per page), preference
history and restore, merged Continue Watching, Emby health probe,
subtitle selection and Bazarr download, structured request logging with
per-request identity, and embedded build version.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 22:33:56 +12:00

46 lines
951 B
Go

package api
import (
"strings"
"testing"
)
func TestContinueWatchingRequestsEpisodeMetadata(t *testing.T) {
fields := strings.Split(fieldsContinue, ",")
want := []string{
"Overview",
"Genres",
"ProductionYear",
"OfficialRating",
"CommunityRating",
"RunTimeTicks",
"SeriesId",
"SeriesName",
"ParentIndexNumber",
"IndexNumber",
}
for _, field := range want {
if !fieldListContains(fields, field) {
t.Errorf("Continue Watching does not request %s", field)
}
}
}
func TestDetailRequestsEpisodeIdentity(t *testing.T) {
fields := strings.Split(fieldsDetail, ",")
for _, field := range []string{"SeriesId", "SeriesName", "ParentIndexNumber", "IndexNumber"} {
if !fieldListContains(fields, field) {
t.Errorf("item detail does not request %s", field)
}
}
}
func fieldListContains(values []string, target string) bool {
for _, value := range values {
if value == target {
return true
}
}
return false
}