diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-11-22 07:44:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 10:44:48 -0500 |
commit | fe49cb0243bed03f565269d84836bf21a0597665 (patch) | |
tree | bd8ea4fcb3d2201f2b294c6b8eddc7f6cc1de516 /tests/integration | |
parent | bc7d599030cad2e69139b79ad5a878504fbf8ed9 (diff) | |
download | gitea-fe49cb0243bed03f565269d84836bf21a0597665.tar.gz gitea-fe49cb0243bed03f565269d84836bf21a0597665.zip |
Fix get reviewers' bug (#32415)
This PR rewrites `GetReviewer` function and move it to service layer.
Reviewers should not be watchers, so that this PR removed all watchers
from reviewers. When the repository is under an organization, the pull
request unit read permission will be checked to resolve the bug of
#32394
Fix #32394
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/api_repo_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 93c9ca0920..122afbfa08 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -718,8 +718,8 @@ func TestAPIRepoGetReviewers(t *testing.T) { resp := MakeRequest(t, req, http.StatusOK) var reviewers []*api.User DecodeJSON(t, resp, &reviewers) - if assert.Len(t, reviewers, 3) { - assert.ElementsMatch(t, []int64{1, 4, 11}, []int64{reviewers[0].ID, reviewers[1].ID, reviewers[2].ID}) + if assert.Len(t, reviewers, 1) { + assert.ElementsMatch(t, []int64{2}, []int64{reviewers[0].ID}) } } |