Fix bug about ListOptions and stars/watchers pagnation (#14556) (#14573)

* Fix bug about ListOptions and stars/watchers pagnation

* fix unit test
This commit is contained in:
6543 2021-02-05 22:11:15 +01:00 committed by GitHub
parent da7a525c5c
commit d0174d45ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View file

@ -18,7 +18,7 @@ func TestGetCommitStatuses(t *testing.T) {
sha1 := "1234123412341234123412341234123412341234"
statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{})
statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{ListOptions: ListOptions{Page: 1, PageSize: 50}})
assert.NoError(t, err)
assert.Equal(t, int(maxResults), 5)
assert.Len(t, statuses, 5)