1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 17:17:19 +00:00

Fix branch api canPush and canMerge (#10776)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Lunny Xiao
2020-03-21 11:41:33 +08:00
committed by GitHub
parent b3f4f812d8
commit dcaa5643d7
3 changed files with 45 additions and 25 deletions

View File

@ -28,6 +28,8 @@ func testAPIGetBranch(t *testing.T, branchName string, exists bool) {
var branch api.Branch
DecodeJSON(t, resp, &branch)
assert.EqualValues(t, branchName, branch.Name)
assert.True(t, branch.UserCanPush)
assert.True(t, branch.UserCanMerge)
}
func testAPIGetBranchProtection(t *testing.T, branchName string, expectedHTTPStatus int) {