package apitest import ( "net/http" "testing" "git.artlef.fr/bibliomane/internal/dto" "git.artlef.fr/bibliomane/internal/testutils" "github.com/stretchr/testify/assert" ) func TestFetchAllCollections_OK(t *testing.T) { status, res := testFetchCollections(t, "10", "0") assert.Equal(t, http.StatusOK, status) assert.Equal(t, int64(4), res.Count) assert.Equal(t, 4, len(res.Collections)) } func testFetchCollections(t *testing.T, limit string, offset string) (int, dto.CollectionItemsGet) { return testutils.TestFetchModel[dto.CollectionItemsGet](t, "/ws/collections", limit, offset) }