test: update kobo and media test signatures

- Remove handler parameter from test function calls
- Update test signatures to match new setupTestServer return values
- Fix compilation errors after test helper refactoring
- Maintain test functionality for kobo and media endpoints
This commit is contained in:
2026-02-06 17:07:12 -05:00
parent 2ff8506718
commit 0781cd871e
3 changed files with 22 additions and 22 deletions
+5 -5
View File
@@ -42,7 +42,7 @@ func createTestLibrary(t *testing.T, ts *httptest.Server, token, name string) st
// TestMediaItemISBNNormalization tests ISBN normalization with media-items endpoint
func TestMediaItemISBNNormalization(t *testing.T) {
ts, db, _, _ := setupTestServer(t)
ts, db, _ := setupTestServer(t)
defer ts.Close()
// Create an ebook library first
@@ -131,7 +131,7 @@ func TestMediaItemISBNNormalization(t *testing.T) {
// TestMediaItemISBNEdgeCases tests ISBN edge cases
func TestMediaItemISBNEdgeCases(t *testing.T) {
ts, db, _, _ := setupTestServer(t)
ts, db, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, db)
@@ -216,7 +216,7 @@ func TestMediaItemISBNEdgeCases(t *testing.T) {
// TestMediaItemsPagination tests pagination with media-items endpoint
func TestMediaItemsPagination(t *testing.T) {
ts, db, _, _ := setupTestServer(t)
ts, db, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, db)
@@ -323,7 +323,7 @@ func TestMediaItemsPagination(t *testing.T) {
// TestMediaItemLibraryRequirement tests that media items require a library
func TestMediaItemLibraryRequirement(t *testing.T) {
ts, db, _, _ := setupTestServer(t)
ts, db, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, db)
@@ -386,7 +386,7 @@ func TestMediaItemLibraryRequirement(t *testing.T) {
// TestUpdateMediaItemISBN tests updating media-item ISBN
func TestUpdateMediaItemISBN(t *testing.T) {
ts, db, _, _ := setupTestServer(t)
ts, db, _ := setupTestServer(t)
defer ts.Close()
token := loginTestUser(t, ts, db)