MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestPaginateBoxPostings_NoNextURL

Function TestPaginateBoxPostings_NoNextURL

internal/cmd/box_test.go:163–178  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestPaginateBoxPostings_NoNextURL(t *testing.T) {
164 first := &generated.BoxShowResponse{
165 Postings: makePostings(10, 0),
166 }
167
168 postings, nextURL, err := paginateBoxPostings(context.Background(), first, 0, true, nil)
169 if err != nil {
170 t.Fatal(err)
171 }
172 if len(postings) != 10 {
173 t.Errorf("expected 10 postings, got %d", len(postings))
174 }
175 if nextURL != "" {
176 t.Errorf("expected empty nextURL when no next URL, got %q", nextURL)
177 }
178}
179
180func TestPaginateBoxPostings_EmptyPageStopsPagination(t *testing.T) {
181 first := &generated.BoxShowResponse{

Callers

nothing calls this directly

Calls 2

makePostingsFunction · 0.85
paginateBoxPostingsFunction · 0.85

Tested by

no test coverage detected