Files
bookhoard/bruno/collections/Bulk Remove Books - All Books.bru
T
john-okeefe 3117ce54ec refactor(bruno): migrate API tests to Bruno DSL format
- 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
2026-02-08 20:49:06 -05:00

56 lines
1.2 KiB
Plaintext

meta {
name: Bulk Remove Books - All Books
type: http
seq: 5
}
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": [
"{{bookId1}}",
"{{bookId2}}",
"{{bookId3}}"
]
}
}
script:post-response {
function onResponse(res) {
if (res.getStatus() === 200) {
tests['All books removed'] = true;
const body = res.getBody();
tests['Removed equals total'] = body.removed === body.total;
tests['Total is 3'] = body.total === 3;
}
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Bulk Remove Books - All Books
Tests removing multiple books from a collection in a single request.
**Expected Result:** 200 OK with removed: 3, total: 3
**Purpose:** Verifies the bulk remove functionality works correctly when removing multiple books that all exist in the collection.
**Use Case:** Common scenario when a user wants to remove several books from a collection at once, such as when reorganizing their library or removing books they've finished reading.
}