mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	* 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
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zeripath
					zeripath