diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-12-22 00:59:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 23:59:59 +0000 |
commit | 838db2f8911690fa2115c6827ed73687db71bef1 (patch) | |
tree | 6c364eca7570962619d0e416dcc8b175331bbf2b /tests/integration/api_team_user_test.go | |
parent | 04b235d094218b780b62f024b7ae9716ad2e633f (diff) | |
download | gitea-838db2f8911690fa2115c6827ed73687db71bef1.tar.gz gitea-838db2f8911690fa2115c6827ed73687db71bef1.zip |
Convert to url auth to header auth in tests (#28484)
Related #28390
Diffstat (limited to 'tests/integration/api_team_user_test.go')
-rw-r--r-- | tests/integration/api_team_user_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/api_team_user_test.go b/tests/integration/api_team_user_test.go index aa33c69041..6c80bc9f80 100644 --- a/tests/integration/api_team_user_test.go +++ b/tests/integration/api_team_user_test.go @@ -25,10 +25,12 @@ func TestAPITeamUser(t *testing.T) { normalUsername := "user2" session := loginUser(t, normalUsername) token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadOrganization) - req := NewRequest(t, "GET", "/api/v1/teams/1/members/user1?token="+token) + req := NewRequest(t, "GET", "/api/v1/teams/1/members/user1"). + AddTokenAuth(token) MakeRequest(t, req, http.StatusNotFound) - req = NewRequest(t, "GET", "/api/v1/teams/1/members/user2?token="+token) + req = NewRequest(t, "GET", "/api/v1/teams/1/members/user2"). + AddTokenAuth(token) resp := MakeRequest(t, req, http.StatusOK) var user2 *api.User DecodeJSON(t, resp, &user2) |