aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_wiki_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_wiki_test.go')
-rw-r--r--tests/integration/api_wiki_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration/api_wiki_test.go b/tests/integration/api_wiki_test.go
index f598982555..05d90fc4e3 100644
--- a/tests/integration/api_wiki_test.go
+++ b/tests/integration/api_wiki_test.go
@@ -182,13 +182,13 @@ func TestAPINewWikiPage(t *testing.T) {
session := loginUser(t, username)
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
- urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/new?token=%s", username, "repo1", token)
+ urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/new", username, "repo1")
req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateWikiPageOptions{
Title: title,
ContentBase64: base64.StdEncoding.EncodeToString([]byte("Wiki page content for API unit tests")),
Message: "",
- })
+ }).AddTokenAuth(token)
MakeRequest(t, req, http.StatusCreated)
}
}
@@ -199,13 +199,13 @@ func TestAPIEditWikiPage(t *testing.T) {
session := loginUser(t, username)
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteRepository)
- urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/page/Page-With-Spaced-Name?token=%s", username, "repo1", token)
+ urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/wiki/page/Page-With-Spaced-Name", username, "repo1")
req := NewRequestWithJSON(t, "PATCH", urlStr, &api.CreateWikiPageOptions{
Title: "edited title",
ContentBase64: base64.StdEncoding.EncodeToString([]byte("Edited wiki page content for API unit tests")),
Message: "",
- })
+ }).AddTokenAuth(token)
MakeRequest(t, req, http.StatusOK)
}