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
This commit is contained in:
2026-02-08 20:49:06 -05:00
parent cb76b9ca05
commit 3117ce54ec
93 changed files with 3974 additions and 1576 deletions
+49 -10
View File
@@ -1,5 +1,5 @@
meta {
name: "Get Unlinked Books - User View"
name: Get Unlinked Books - User View
type: http
seq: 4
}
@@ -7,15 +7,54 @@ meta {
get {
url: {{base_url}}/api/sync/unlinked-books
body: none
auth: {
type: bearer
bearer: {{user_token}}
}
auth: inherit
}
assert {
response.status == 200
response.body.unlinked exists()
response.body.total exists()
response.body.total >= 0
headers {
Authorization: Bearer {{user_token}}
Content-Type: application/json
}
script:post-response {
function onResponse(res) {
if (res.getStatus() === 200) {
const body = res.getBody();
tests('Has unlinked array', body.unlinked !== undefined);
tests('Has total count', body.total !== undefined);
tests('Total >= 0', body.total >= 0);
}
}
onResponse(res);
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Get Unlinked Books - User View
Retrieves all unlinked books for the authenticated user that need manual linking.
**Method:** GET
**Endpoint:** /api/sync/unlinked-books
**Authentication:** Bearer token
**Response:**
- `unlinked` (array): Array of unlinked book objects
- `id` (string): Unlinked book UUID
- `title` (string): Book title
- `author` (string): Book author
- `device_id` (string): Source device ID
- `device_name` (string): Source device name
- `detected_at` (string): Detection timestamp
- `total` (number): Total count of unlinked books
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 500: Internal server error
}