Files
bookhoard/bruno/collections/Bulk Remove Books - Empty List.bru
T
john-okeefe 26070e4000 Refactor: rename baseUrl to base_url in .bru files
Update configuration key naming convention to use snake_case
consistently.
Applies changes recursively across all subdirectories.
2026-02-08 21:26:31 -05:00

47 lines
832 B
Plaintext

meta {
name: Bulk Remove Books - Empty List
type: http
seq: 2
}
post {
url: {{base_url}}/api/collections/{{collection_id}}/books/bulk-remove
body: json
auth: inherit
}
headers {
Content-Type: application/json
Authorization: Bearer {{authToken}}
}
body:json {
{
"book_ids": []
}
}
script:post-response {
function onResponse(res) {
tests['Returns 400 for empty list'] = res.getStatus() === 400;
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Bulk Remove Books - Empty List Validation
Tests validation behavior when providing an empty book_ids array.
**Expected Result:** 400 Bad Request
**Validation Rule:** book_ids array must contain at least one book UUID.
**Purpose:** Ensures the API properly validates input and rejects empty removal requests.
}