0.3.33
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ponzischeme89/memby/server/internal/emby"
|
||||
)
|
||||
|
||||
func TestReleasePublishTokenCanComeFromSecretFile(t *testing.T) {
|
||||
@@ -109,3 +111,20 @@ func TestAnalyticsRetentionCannotDropBelowThirtyDays(t *testing.T) {
|
||||
t.Fatalf("analytics retention = %v, want 30 days", cfg.AnalyticsRetention)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLegacyClientNameOverrideIsIgnored(t *testing.T) {
|
||||
t.Setenv("MEMBY_EMBY_URL", "http://emby")
|
||||
t.Setenv("MEMBY_DATABASE_URL", "postgres://memby")
|
||||
t.Setenv("MEMBY_CLIENT_NAME", "Memby")
|
||||
|
||||
cfg, err := Load()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if cfg.ClientName != emby.DefaultClientName {
|
||||
t.Fatalf("client name = %q, want %q", cfg.ClientName, emby.DefaultClientName)
|
||||
}
|
||||
if cfg.IgnoredClientName != "Memby" {
|
||||
t.Fatalf("ignored client name = %q, want Memby", cfg.IgnoredClientName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user