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_issue_subscription_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_issue_subscription_test.go')
-rw-r--r-- | tests/integration/api_issue_subscription_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/integration/api_issue_subscription_test.go b/tests/integration/api_issue_subscription_test.go index 68b29f3641..a32b51e6fc 100644 --- a/tests/integration/api_issue_subscription_test.go +++ b/tests/integration/api_issue_subscription_test.go @@ -37,7 +37,7 @@ func TestAPIIssueSubscriptions(t *testing.T) { urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/check?token=%s", issueRepo.OwnerName, issueRepo.Name, issue.Index, token) req := NewRequest(t, "GET", urlStr) - resp := session.MakeRequest(t, req, http.StatusOK) + resp := MakeRequest(t, req, http.StatusOK) wi := new(api.WatchInfo) DecodeJSON(t, resp, wi) @@ -57,20 +57,20 @@ func TestAPIIssueSubscriptions(t *testing.T) { issue1Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue1.RepoID}) urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s?token=%s", issue1Repo.OwnerName, issue1Repo.Name, issue1.Index, owner.Name, token) req := NewRequest(t, "DELETE", urlStr) - session.MakeRequest(t, req, http.StatusCreated) + MakeRequest(t, req, http.StatusCreated) testSubscription(issue1, false) req = NewRequest(t, "DELETE", urlStr) - session.MakeRequest(t, req, http.StatusOK) + MakeRequest(t, req, http.StatusOK) testSubscription(issue1, false) issue5Repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue5.RepoID}) urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s?token=%s", issue5Repo.OwnerName, issue5Repo.Name, issue5.Index, owner.Name, token) req = NewRequest(t, "PUT", urlStr) - session.MakeRequest(t, req, http.StatusCreated) + MakeRequest(t, req, http.StatusCreated) testSubscription(issue5, true) req = NewRequest(t, "PUT", urlStr) - session.MakeRequest(t, req, http.StatusOK) + MakeRequest(t, req, http.StatusOK) testSubscription(issue5, true) } |