summaryrefslogtreecommitdiffstats
path: root/models/commit_status_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-07-25 11:55:06 +0100
committerGitHub <noreply@github.com>2019-07-25 11:55:06 +0100
commit734aa965088fb72330f4ad744c187c614cce3d8b (patch)
tree96c97d3333b54e327a2ff5b6a5549b9567157eff /models/commit_status_test.go
parent5efd3630bc21d4b0ba6ff492d16d4c7e2814dd1f (diff)
downloadgitea-734aa965088fb72330f4ad744c187c614cce3d8b.tar.gz
gitea-734aa965088fb72330f4ad744c187c614cce3d8b.zip
Fix #7136: Add paging and extend API GetCommitStatuses (#7141)
* Fix #7136: Add paging and extend API GetCommitStatuses * update swagger * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Apply suggestions from code review
Diffstat (limited to 'models/commit_status_test.go')
-rw-r--r--models/commit_status_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/commit_status_test.go b/models/commit_status_test.go
index 78d2370f9d..580db127f6 100644
--- a/models/commit_status_test.go
+++ b/models/commit_status_test.go
@@ -17,8 +17,9 @@ func TestGetCommitStatuses(t *testing.T) {
sha1 := "1234123412341234123412341234123412341234"
- statuses, err := GetCommitStatuses(repo1, sha1, 0)
+ statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{})
assert.NoError(t, err)
+ assert.Equal(t, int(maxResults), 5)
if assert.Len(t, statuses, 5) {
assert.Equal(t, statuses[0].Context, "ci/awesomeness")
assert.Equal(t, statuses[0].State, CommitStatusPending)