Добавил логи

This commit is contained in:
2026-06-14 19:37:09 +03:00
parent d4bf8a8cad
commit 81ed58ecff
28 changed files with 379 additions and 121 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ func fakeTVDB(t *testing.T, logins *atomic.Int32) *httptest.Server {
func newTVDB(t *testing.T, url string) *TVDB {
t.Helper()
c, err := NewTVDB(TVDBConfig{APIKey: "k", BaseURL: url})
c, err := NewTVDB(TVDBConfig{APIKey: "k", BaseURL: url}, nil)
if err != nil {
t.Fatalf("NewTVDB: %v", err)
}
@@ -126,7 +126,7 @@ func TestTVDB_ReloginOn401(t *testing.T) {
}
func TestNewTVDB_RequiresKey(t *testing.T) {
if _, err := NewTVDB(TVDBConfig{}); err == nil {
if _, err := NewTVDB(TVDBConfig{}, nil); err == nil {
t.Fatal("want error without api_key")
}
}