Remove session in api tests (#21984)
It's no meaning to request an API route with session.
This commit is contained in:
parent
665d02efaf
commit
df676a47d0
46 changed files with 387 additions and 433 deletions
|
@ -23,9 +23,8 @@ func TestAPIPullCommits(t *testing.T) {
|
|||
assert.NoError(t, pr.LoadIssue(db.DefaultContext))
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pr.HeadRepoID})
|
||||
|
||||
session := loginUser(t, "user2")
|
||||
req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/commits", repo.OwnerName, repo.Name, pr.Index)
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var commits []*api.Commit
|
||||
DecodeJSON(t, resp, &commits)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue