From 778d611cab010ea307f09b7043c8d4f3f6e53d6c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 10 Feb 2026 20:51:29 -0500 Subject: [PATCH] test: update collections bulk tests for 'added' field rename Update test assertions in TestCollectionsBulkOperations to expect 'added' instead of 'success' in the response, matching the handler change made in the bulk operations rename. Fixes: - BulkAddBooks_InvalidCollectionID: assert 'added' field exists - BulkAddBooks_SingleOperation: assert 'added' field exists --- cmd/server/tests/collections_bulk_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/server/tests/collections_bulk_test.go b/cmd/server/tests/collections_bulk_test.go index 346320f..38b6cd2 100644 --- a/cmd/server/tests/collections_bulk_test.go +++ b/cmd/server/tests/collections_bulk_test.go @@ -91,7 +91,7 @@ func TestCollectionsBulkOperations(t *testing.T) { assert.Contains(t, result, "results") assert.Contains(t, result, "total") - assert.Contains(t, result, "success") + assert.Contains(t, result, "added") assert.Contains(t, result, "failed") results := result["results"].([]interface{}) @@ -209,7 +209,7 @@ func TestCollectionsBulkOperations(t *testing.T) { assert.Contains(t, result, "results") assert.Contains(t, result, "total") - assert.Contains(t, result, "success") + assert.Contains(t, result, "added") assert.Contains(t, result, "failed") results := result["results"].([]interface{}) @@ -272,7 +272,7 @@ func TestCollectionsBulkOperations(t *testing.T) { json.NewDecoder(resp.Body).Decode(&result) assert.Equal(t, 3.0, result["total"]) - assert.True(t, result["success"].(float64) > 0) + assert.True(t, result["added"].(float64) > 0) }) t.Run("BulkAddBooks_MultipleCollections", func(t *testing.T) {