fix: update test files for token handling and response parsing
- Update callers of createTestMediaItemID to not pass token - Fix loginAdminUser to delete/recreate admin user for consistent state - Fix TestListAllQueueItems_Admin to parse response as map with 'items' key - Remove unused token variables from tests - Update device_test.go with admin password hash constant
This commit is contained in:
@@ -34,7 +34,7 @@ func TestBookMatchingQueryBooks(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("QueryBooks_WithAuth_ByTitle", func(t *testing.T) {
|
||||
_ = createTestMediaItemID(t, setup.Server, token)
|
||||
_ = createTestMediaItemID(t, setup.Server)
|
||||
|
||||
req := map[string]interface{}{
|
||||
"title": "Test Ebook",
|
||||
@@ -157,7 +157,7 @@ func TestBookMatchingBulkLink(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("BulkLinkBooks_InvalidUnlinkedBookID", func(t *testing.T) {
|
||||
bookID := createTestMediaItemID(t, setup.Server, token)
|
||||
bookID := createTestMediaItemID(t, setup.Server)
|
||||
|
||||
req := map[string]interface{}{
|
||||
"links": []map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user