Fix bug on branch API (#10767) (#10775)

* Fix bug on branch API (#10767)

* Fix branch api canPush and canMerge
This commit is contained in:
2020-03-21 05:31:01 +08:00
committed by GitHub
parent e2da9cd21f
commit 602fe45936
4 changed files with 60 additions and 9 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 TestAPIGetBranch(t *testing.T) {