Fixed issue where querying empty collection returns an empty book record

This commit is contained in:
2026-04-06 21:08:32 +02:00
parent 2552ba8e94
commit a537c12a3b
5 changed files with 31 additions and 11 deletions

View File

@@ -12,8 +12,8 @@ import (
func TestFetchAllCollections_OK(t *testing.T) {
status, res := testFetchCollections(t, "10", "0")
assert.Equal(t, http.StatusOK, status)
assert.Equal(t, int64(2), res.Count)
assert.Equal(t, 2, len(res.Collections))
assert.Equal(t, int64(3), res.Count)
assert.Equal(t, 3, len(res.Collections))
}
func testFetchCollections(t *testing.T, limit string, offset string) (int, dto.CollectionItemsGet) {