diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-12-02 11:39:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 22:39:42 -0500 |
commit | df676a47d05b20f7bfe4fdae350f50af15b52905 (patch) | |
tree | dc747e21fd2a533aeacb1686f747bba0a8f60736 /tests/integration/api_repo_git_ref_test.go | |
parent | 665d02efaf6ebaadf3ffb5b412ea77c4502f0baf (diff) | |
download | gitea-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_repo_git_ref_test.go')
-rw-r--r-- | tests/integration/api_repo_git_ref_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/api_repo_git_ref_test.go b/tests/integration/api_repo_git_ref_test.go index ee4ae6e126..aac01ca9ad 100644 --- a/tests/integration/api_repo_git_ref_test.go +++ b/tests/integration/api_repo_git_ref_test.go @@ -24,12 +24,12 @@ func TestAPIReposGitRefs(t *testing.T) { "refs/tags/v1.1", // Tag } { req := NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/%s?token="+token, user.Name, ref) - session.MakeRequest(t, req, http.StatusOK) + MakeRequest(t, req, http.StatusOK) } // Test getting all refs req := NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/refs?token="+token, user.Name) - session.MakeRequest(t, req, http.StatusOK) + MakeRequest(t, req, http.StatusOK) // Test getting non-existent refs req = NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/refs/heads/unknown?token="+token, user.Name) - session.MakeRequest(t, req, http.StatusNotFound) + MakeRequest(t, req, http.StatusNotFound) } |