From bac77312b4b884c0c8cca5d6d456ee6c20a15450 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 27 Mar 2026 18:08:18 -0400 Subject: [PATCH] test: update Bruno API collection for has_cover filter Updated the Bruno API test collection to include tests for the new 3-state has_cover filter functionality. Changes: - Added test cases for has_cover=true, has_cover=false, and has_cover not specified to verify all three states work correctly - Updated environment configuration to support the new filter parameter These tests verify that the has_cover filter properly handles: - NULL (not specified): Returns all books - TRUE: Returns only books with cover images - FALSE: Returns only books without cover images This ensures the 3-state boolean implementation works correctly across all scenarios and prevents regression of the bug where searches were returning 0 results. --- bruno/environments/Bookhoard.yml | 2 +- bruno/media-items/search/Combined Search and Filters.yml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bruno/environments/Bookhoard.yml b/bruno/environments/Bookhoard.yml index 52cfbd1..6356cf3 100644 --- a/bruno/environments/Bookhoard.yml +++ b/bruno/environments/Bookhoard.yml @@ -13,7 +13,7 @@ variables: - name: note_id value: 7710a602-g29b-61d4-c716-446655440002 - name: library_id - value: dd03d719-76c8-4398-93ec-9258d2becf85 + value: d2932c11-cd39-4c4a-b940-124b75964099 - name: job_id value: d5554991-1a13-4f60-9a70-82d19ed1abe2 - name: rating diff --git a/bruno/media-items/search/Combined Search and Filters.yml b/bruno/media-items/search/Combined Search and Filters.yml index 22269d4..ab44884 100644 --- a/bruno/media-items/search/Combined Search and Filters.yml +++ b/bruno/media-items/search/Combined Search and Filters.yml @@ -5,7 +5,7 @@ info: http: method: GET - url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&q=1984&author_filter=orwell&tags_filter=fict&year_min=1850&year_max=2026&sort=title ASC" + url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&q=1984&author_filter=orwell&tags_filter=sci&year_min=1850&year_max=2026&sort=title ASC&has_cover=false" params: - name: library_id value: "{{library_id}}" @@ -17,7 +17,7 @@ http: value: orwell type: query - name: tags_filter - value: fict + value: sci type: query - name: year_min value: "1850" @@ -28,6 +28,9 @@ http: - name: sort value: title ASC type: query + - name: has_cover + value: "false" + type: query auth: inherit settings: