Files
bookhoard/bruno/opds/Download Book KEPUB (On-the-fly Conversion).bru
T
john-okeefe 2521a8c966 test(api): add Bruno tests for sync-kobo and OPDS features
Sync-Kobo:
- Auto link books endpoint tests
- Bulk link books endpoint tests
- Get unlinked book suggestions endpoint tests

OPDS:
- Download book with on-the-fly KEPUB conversion tests

All tests cover no user, user, and admin contexts
2026-02-01 12:16:19 -05:00

36 lines
1.1 KiB
Plaintext

{
"meta": {
"name": "Download Book KEPUB (On-the-fly Conversion)",
"type": "http",
"event": [
{
"listen": "test",
"script": {
"exec": [
"// Test format-specific hash header",
"const kepubHash = resp.headers.get('X-Bookmann-KEPUB-SHA256');",
"if (kepubHash) {",
" tests['KEPUB hash present'] = true;",
" tests['Hash is 64 chars'] = kepubHash.length === 64;",
"} else {",
" tests['KEPUB hash present'] = false;",
"}",
"",
"// Verify Bookmann UUID header",
"const bookmannUUID = resp.headers.get('X-Bookmann-UUID');",
"tests['Bookmann UUID present'] = bookmannUUID !== null;",
"",
"// Verify content type",
"const contentType = resp.headers.get('Content-Type');",
"tests['Content-Type is KEPUB'] = contentType && contentType.includes('kepub');"
]
}
}
]
},
"req": {
"url": "{{baseUrl}}/opds/devices/{{deviceId}}/download/{{mediaItemId}}?format=kepub",
"method": "GET"
}
}