- Move all files from bruno-yaml/* to bruno/* - Maintains existing directory structure within categories - Updates bruno/user/auth files with OAuth2 refresh token flow - Updates bruno/user/profile files for user profile management - Adds bruno/dashboard/ directory with dashboard API tests - Preserves all existing test scenarios and OpenCollection YAML format - No functional changes - file reorganization only
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
info:
|
|
name: Test Collection Rules - No Matches
|
|
type: http
|
|
seq: 4
|
|
http:
|
|
method: POST
|
|
url: '{{base_url}}/api/collections/test-rules'
|
|
auth: inherit
|
|
body:
|
|
type: json
|
|
jsonBody: "{\n \"rules\": [\n {\n \"field\": \"genre\",\n \
|
|
\ \"operator\": \"equals\",\n \"value\": \"NonExistentGenre123456\""
|
|
headers:
|
|
- key: Content-Type
|
|
value: application/json
|
|
- key: Authorization
|
|
value: Bearer {{authToken
|
|
|
|
docs: |-
|
|
## Test Collection Rules - No Matches
|
|
|
|
Tests behavior when collection rules don't match any books in the library.
|
|
|
|
**Example Use Case:** Validating that a new genre name doesn't exist before creating a collection for it, or testing edge cases.
|
|
|
|
**Expected Result:** 200 OK with empty matches array and total: 0
|
|
|
|
**Purpose:** Verifies that the API handles zero-match scenarios gracefully:
|
|
- Returns 200 (success) not 404
|
|
- Returns empty array, not null
|
|
- Returns total: 0 for clarity
|
|
- No errors thrown for no results
|
|
|
|
**Note:** An empty result set is a valid response and doesn't indicate an error. This allows users to test rules confidently before creating collections.
|