aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/api_user_search_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-02 11:39:42 +0800
committerGitHub <noreply@github.com>2022-12-01 22:39:42 -0500
commitdf676a47d05b20f7bfe4fdae350f50af15b52905 (patch)
treedc747e21fd2a533aeacb1686f747bba0a8f60736 /tests/integration/api_user_search_test.go
parent665d02efaf6ebaadf3ffb5b412ea77c4502f0baf (diff)
downloadgitea-df676a47d05b20f7bfe4fdae350f50af15b52905.tar.gz
gitea-df676a47d05b20f7bfe4fdae350f50af15b52905.zip
Remove session in api tests (#21984)
It's no meaning to request an API route with session.
Diffstat (limited to 'tests/integration/api_user_search_test.go')
-rw-r--r--tests/integration/api_user_search_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_user_search_test.go b/tests/integration/api_user_search_test.go
index 58b24d0e1e..dc11281c46 100644
--- a/tests/integration/api_user_search_test.go
+++ b/tests/integration/api_user_search_test.go
@@ -29,7 +29,7 @@ func TestAPIUserSearchLoggedIn(t *testing.T) {
token := getTokenForLoggedInUser(t, session)
query := "user2"
req := NewRequestf(t, "GET", "/api/v1/users/search?token=%s&q=%s", token, query)
- resp := session.MakeRequest(t, req, http.StatusOK)
+ resp := MakeRequest(t, req, http.StatusOK)
var results SearchResults
DecodeJSON(t, resp, &results)
@@ -69,7 +69,7 @@ func TestAPIUserSearchAdminLoggedInUserHidden(t *testing.T) {
query := "user31"
req := NewRequestf(t, "GET", "/api/v1/users/search?token=%s&q=%s", token, query)
req.SetBasicAuth(token, "x-oauth-basic")
- resp := session.MakeRequest(t, req, http.StatusOK)
+ resp := MakeRequest(t, req, http.StatusOK)
var results SearchResults
DecodeJSON(t, resp, &results)