summaryrefslogtreecommitdiffstats
path: root/tests/integration/pull_update_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-12-22 00:59:59 +0100
committerGitHub <noreply@github.com>2023-12-21 23:59:59 +0000
commit838db2f8911690fa2115c6827ed73687db71bef1 (patch)
tree6c364eca7570962619d0e416dcc8b175331bbf2b /tests/integration/pull_update_test.go
parent04b235d094218b780b62f024b7ae9716ad2e633f (diff)
downloadgitea-838db2f8911690fa2115c6827ed73687db71bef1.tar.gz
gitea-838db2f8911690fa2115c6827ed73687db71bef1.zip
Convert to url auth to header auth in tests (#28484)
Related #28390
Diffstat (limited to 'tests/integration/pull_update_test.go')
-rw-r--r--tests/integration/pull_update_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/pull_update_test.go b/tests/integration/pull_update_test.go
index e4b2ae65bd..078253ffb0 100644
--- a/tests/integration/pull_update_test.go
+++ b/tests/integration/pull_update_test.go
@@ -40,7 +40,8 @@ func TestAPIPullUpdate(t *testing.T) {
session := loginUser(t, "user2")
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
- req := NewRequestf(t, "POST", "/api/v1/repos/%s/%s/pulls/%d/update?token="+token, pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Issue.Index)
+ req := NewRequestf(t, "POST", "/api/v1/repos/%s/%s/pulls/%d/update", pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Issue.Index).
+ AddTokenAuth(token)
session.MakeRequest(t, req, http.StatusOK)
// Test GetDiverging after update
@@ -68,7 +69,8 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
session := loginUser(t, "user2")
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
- req := NewRequestf(t, "POST", "/api/v1/repos/%s/%s/pulls/%d/update?style=rebase&token="+token, pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Issue.Index)
+ req := NewRequestf(t, "POST", "/api/v1/repos/%s/%s/pulls/%d/update?style=rebase", pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Issue.Index).
+ AddTokenAuth(token)
session.MakeRequest(t, req, http.StatusOK)
// Test GetDiverging after update