aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_teams_test.go
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-18 01:33:06 +0000
committerGitHub <noreply@github.com>2021-11-18 09:33:06 +0800
commitc98dd7a3e0a08b1e890d6030dd51aae9dd45aaf9 (patch)
treee50b4bf9fc94e26d26d1f9709f4e8275eed60fc1 /integrations/api_repo_teams_test.go
parentb01f6c1a8c9f358c297e0d1f4ee8696c9e25d5b2 (diff)
downloadgitea-c98dd7a3e0a08b1e890d6030dd51aae9dd45aaf9.tar.gz
gitea-c98dd7a3e0a08b1e890d6030dd51aae9dd45aaf9.zip
Remove unnecessary variable assignments (#17695)
* Remove unnecessary variable assignments As title * enable ineffassign Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'integrations/api_repo_teams_test.go')
-rw-r--r--integrations/api_repo_teams_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/integrations/api_repo_teams_test.go b/integrations/api_repo_teams_test.go
index 56836fcee3..59025e0e53 100644
--- a/integrations/api_repo_teams_test.go
+++ b/integrations/api_repo_teams_test.go
@@ -54,12 +54,12 @@ func TestAPIRepoTeams(t *testing.T) {
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "NonExistingTeam", token)
req = NewRequest(t, "GET", url)
- res = session.MakeRequest(t, req, http.StatusNotFound)
+ session.MakeRequest(t, req, http.StatusNotFound)
// AddTeam with user4
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "PUT", url)
- res = session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
// AddTeam with user2
user = unittest.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
@@ -67,12 +67,12 @@ func TestAPIRepoTeams(t *testing.T) {
token = getTokenForLoggedInUser(t, session)
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "PUT", url)
- res = session.MakeRequest(t, req, http.StatusNoContent)
- res = session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
+ session.MakeRequest(t, req, http.StatusNoContent)
+ session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
// DeleteTeam
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "DELETE", url)
- res = session.MakeRequest(t, req, http.StatusNoContent)
- res = session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
+ session.MakeRequest(t, req, http.StatusNoContent)
+ session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
}