test(bruno): update API tests for /api/media-items/ endpoints

- Update bulk-delete test: endpoint URL, request field (book_ids → media_item_ids), response field (success → deleted), documentation
- Update bulk-update test: endpoint URL, request structure (updates → media_item_updates), response field (success → updated), documentation
- Update download test: endpoint URL (/api/books/ → /api/media-items/), documentation
This commit is contained in:
2026-02-10 19:58:41 -05:00
parent bb4b85afcc
commit b364aee631
3 changed files with 39 additions and 39 deletions
+11 -11
View File
@@ -1,11 +1,11 @@
meta {
name: Bulk Delete Books
name: Bulk Delete Media Items
type: http
seq: 1
}
post {
url: {{base_url}}/api/books/bulk-delete
url: {{base_url}}/api/media-items/bulk-delete
body: json
auth: inherit
}
@@ -16,7 +16,7 @@ headers {
body:json {
{
"book_ids": [
"media_item_ids": [
"{{bookId1}}",
"{{bookId2}}",
"{{bookId3}}"
@@ -31,7 +31,7 @@ script:post-response {
const body = res.getBody();
tests['Has results array'] = Array.isArray(body.results);
tests['Has total count'] = body.total !== undefined;
tests['Has success count'] = body.success !== undefined;
tests['Has deleted count'] = body.deleted !== undefined;
tests['Has failed count'] = body.failed !== undefined;
} else {
tests['Bulk delete failed'] = false;
@@ -46,23 +46,23 @@ settings {
}
docs {
## Bulk Delete Books
## Bulk Delete Media Items
Deletes multiple books in a single request.
Deletes multiple media items in a single request.
**Method:** POST
**Endpoint:** /api/books/bulk-delete
**Endpoint:** /api/media-items/bulk-delete
**Authentication:** Required (Bearer token)
**Request Body:**
- `book_ids` (array of strings): Array of book UUIDs to delete
- `media_item_ids` (array of strings): Array of media item UUIDs to delete
**Response:**
- `results` (array): Results for each deletion attempt
- `total` (number): Total number of books processed
- `success` (number): Number of successfully deleted books
- `total` (number): Total number of media items processed
- `deleted` (number): Number of successfully deleted media items
- `failed` (number): Number of failed deletions
**Status Codes:**
@@ -75,7 +75,7 @@ docs {
**Example:**
```json
{
"book_ids": [
"media_item_ids": [
"uuid-1",
"uuid-2",
"uuid-3"