(t *testing.T)
| 161 | } |
| 162 | |
| 163 | func 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 | |
| 180 | func TestPaginateBoxPostings_EmptyPageStopsPagination(t *testing.T) { |
| 181 | first := &generated.BoxShowResponse{ |
nothing calls this directly
no test coverage detected