mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Remove session in api tests (#21984)
It's no meaning to request an API route with session.
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user