refactor(tests): update test helpers and all test file references
- Rename createTestEbookID to createTestMediaItemID in test_helpers.go - Update test helper comments and variable names (ebookReq -> mediaItemReq, etc.) - Update all test file references: - analytics_test.go - book_matching_test.go - collections_bulk_test.go - kobo_test.go - media_bulk_test.go - opds_test.go - Rename ebookID variable to mediaItemID in kobo_test.go - Update test data to use 'Test Media Item' instead of 'Test Ebook'
This commit is contained in:
@@ -66,7 +66,7 @@ func TestCollectionsBulkOperations(t *testing.T) {
|
||||
defer ts.Close()
|
||||
|
||||
token := loginTestUser(t, ts, db)
|
||||
bookID := createTestEbookID(t, ts, token)
|
||||
bookID := createTestMediaItemID(t, ts, token)
|
||||
|
||||
req := map[string]interface{}{
|
||||
"operations": []map[string]interface{}{
|
||||
@@ -186,7 +186,7 @@ func TestCollectionsBulkOperations(t *testing.T) {
|
||||
collectionID := collectionResult["id"].(string)
|
||||
|
||||
// Create a book
|
||||
bookID := createTestEbookID(t, ts, token)
|
||||
bookID := createTestMediaItemID(t, ts, token)
|
||||
|
||||
// Add book to collection
|
||||
addReq := map[string]interface{}{
|
||||
@@ -249,9 +249,9 @@ func TestCollectionsBulkOperations(t *testing.T) {
|
||||
collectionID := collectionResult["id"].(string)
|
||||
|
||||
// Create multiple books
|
||||
bookID1 := createTestEbookID(t, ts, token)
|
||||
bookID2 := createTestEbookID(t, ts, token)
|
||||
bookID3 := createTestEbookID(t, ts, token)
|
||||
bookID1 := createTestMediaItemID(t, ts, token)
|
||||
bookID2 := createTestMediaItemID(t, ts, token)
|
||||
bookID3 := createTestMediaItemID(t, ts, token)
|
||||
|
||||
// Add all books to collection
|
||||
addReq := map[string]interface{}{
|
||||
@@ -326,8 +326,8 @@ func TestCollectionsBulkOperations(t *testing.T) {
|
||||
collectionID2 := collectionResult2["id"].(string)
|
||||
|
||||
// Create books
|
||||
bookID1 := createTestEbookID(t, ts, token)
|
||||
bookID2 := createTestEbookID(t, ts, token)
|
||||
bookID1 := createTestMediaItemID(t, ts, token)
|
||||
bookID2 := createTestMediaItemID(t, ts, token)
|
||||
|
||||
// Add books to multiple collections
|
||||
addReq := map[string]interface{}{
|
||||
@@ -388,7 +388,7 @@ func TestCollectionsBulkOperations(t *testing.T) {
|
||||
collectionID := collectionResult["id"].(string)
|
||||
|
||||
// Create a book
|
||||
bookID := createTestEbookID(t, ts, token)
|
||||
bookID := createTestMediaItemID(t, ts, token)
|
||||
|
||||
// Add book to collection
|
||||
addReq := map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user