From fed50cf72eaaa00ef1f4730f9b12a64a10b66113 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 15 Jan 2024 16:55:10 +0000 Subject: [PATCH] [GITEA] Optionally allow anyone to edit Wikis (squash) AddTokenAuth --- tests/integration/api_wiki_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/api_wiki_test.go b/tests/integration/api_wiki_test.go index b2cc297c7..19fd8c536 100644 --- a/tests/integration/api_wiki_test.go +++ b/tests/integration/api_wiki_test.go @@ -234,12 +234,12 @@ func TestAPIEditOtherWikiPage(t *testing.T) { // Creating a new Wiki page on user2's repo as user1 fails testCreateWiki := func(expectedStatusCode int) { - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/new?token=%s", otherUsername, "repo1", token) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/new", otherUsername, "repo1") req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateWikiPageOptions{ Title: "Globally Edited Page", ContentBase64: base64.StdEncoding.EncodeToString([]byte("Wiki page content for API unit tests")), Message: "", - }) + }).AddTokenAuth(token) session.MakeRequest(t, req, expectedStatusCode) } testCreateWiki(http.StatusForbidden)