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:
@@ -14,7 +14,7 @@ import (
|
||||
// TestMediaBulkOperations tests bulk media operations
|
||||
func TestMediaBulkOperations(t *testing.T) {
|
||||
t.Run("BulkDeleteBooks_WithoutAuth", func(t *testing.T) {
|
||||
ts, _, _, _ := setupTestServer(t)
|
||||
ts, _, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
req := map[string]interface{}{
|
||||
@@ -34,7 +34,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDeleteBooks_EmptyBookIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -57,7 +57,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDeleteBooks_InvalidBookIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -88,7 +88,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDeleteBooks_WithValidBooks", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -123,7 +123,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkDeleteBooks_InvalidRequestBody", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -142,7 +142,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_WithoutAuth", func(t *testing.T) {
|
||||
ts, _, _, _ := setupTestServer(t)
|
||||
ts, _, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
req := map[string]interface{}{
|
||||
@@ -165,7 +165,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_EmptyBookIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -191,7 +191,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_InvalidBookIDs", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -225,7 +225,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_UpdateTags", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -262,7 +262,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_UpdateReadingStatus", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -296,7 +296,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_UpdateMultipleFields", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
@@ -332,7 +332,7 @@ func TestMediaBulkOperations(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkUpdateBooks_InvalidRequestBody", func(t *testing.T) {
|
||||
ts, db, _, _ := setupTestServer(t)
|
||||
ts, db, _ := setupTestServer(t)
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
|
||||
Reference in New Issue
Block a user