- Convert all existing .bru files from JSON to Bruno DSL format - Remove obsolete files (conflicts/api.bru, kobo/Kobo Initialization.bru) - Update auth configuration to use 'inherit' instead of explicit bearer tokens - Add comprehensive documentation to all test files - Improve test scripts with proper assertions and error handling
47 lines
831 B
Plaintext
47 lines
831 B
Plaintext
meta {
|
|
name: Bulk Remove Books - Empty List
|
|
type: http
|
|
seq: 2
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/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.
|
|
}
|