mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 06:01:19 +00:00
test: use the add token auth method for token
This commit is contained in:
parent
8819a0a4fc
commit
3b2943a002
@ -89,9 +89,7 @@ func TestAPIListUserProjects(t *testing.T) {
|
||||
token := getUserToken(t, "user2", auth_model.AccessTokenScopeReadUser, auth_model.AccessTokenScopeReadIssue)
|
||||
link, _ := url.Parse("/api/v1/user/projects")
|
||||
|
||||
link.RawQuery = url.Values{"token": {token}}.Encode()
|
||||
|
||||
req := NewRequest(t, "GET", link.String())
|
||||
req := NewRequest(t, "GET", link.String()).AddTokenAuth(token)
|
||||
var apiProjects []*api.Project
|
||||
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
Loading…
Reference in New Issue
Block a user