Release Memby 0.2.64
This commit is contained in:
@@ -2,6 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -10,6 +11,7 @@ import (
|
||||
"github.com/ponzischeme89/memby/server/internal/radarr"
|
||||
"github.com/ponzischeme89/memby/server/internal/recommend"
|
||||
"github.com/ponzischeme89/memby/server/internal/sonarr"
|
||||
"github.com/ponzischeme89/memby/server/internal/store"
|
||||
)
|
||||
|
||||
var heroNow = time.Date(2026, 8, 7, 20, 0, 0, 0, time.UTC)
|
||||
@@ -630,6 +632,16 @@ func TestAdminHeroSearchAcceptsFilmsAndSeriesOnly(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestHeroPlacementFiltersNeverCrossMediaTypes(t *testing.T) {
|
||||
candidates := []heroCandidate{{ID: "film", Kind: heroMovie}, {ID: "show", Kind: heroSeries}}
|
||||
if got := heroIDs(filterHeroPlacement(candidates, store.HeroPlacementMovies)); !reflect.DeepEqual(got, []string{"film"}) {
|
||||
t.Fatalf("movie hero candidates = %v", got)
|
||||
}
|
||||
if got := heroIDs(filterHeroPlacement(candidates, store.HeroPlacementTVShows)); !reflect.DeepEqual(got, []string{"show"}) {
|
||||
t.Fatalf("television hero candidates = %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func heroIDs(candidates []heroCandidate) []string {
|
||||
ids := make([]string, 0, len(candidates))
|
||||
for _, candidate := range candidates {
|
||||
|
||||
Reference in New Issue
Block a user