aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_reaction_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_issue_reaction_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_issue_reaction_test.go')
-rw-r--r--integrations/api_issue_reaction_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/integrations/api_issue_reaction_test.go b/integrations/api_issue_reaction_test.go
index 4591f8fa8c..7b3632ca67 100644
--- a/integrations/api_issue_reaction_test.go
+++ b/integrations/api_issue_reaction_test.go
@@ -36,24 +36,24 @@ func TestAPIIssuesReactions(t *testing.T) {
req := NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
Reaction: "wrong",
})
- resp := session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
//Delete not allowed reaction
req = NewRequestWithJSON(t, "DELETE", urlStr, &api.EditReactionOption{
Reaction: "zzz",
})
- resp = session.MakeRequest(t, req, http.StatusOK)
+ session.MakeRequest(t, req, http.StatusOK)
//Add allowed reaction
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
Reaction: "rocket",
})
- resp = session.MakeRequest(t, req, http.StatusCreated)
+ resp := session.MakeRequest(t, req, http.StatusCreated)
var apiNewReaction api.Reaction
DecodeJSON(t, resp, &apiNewReaction)
//Add existing reaction
- resp = session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
//Get end result of reaction list of issue #1
req = NewRequestf(t, "GET", urlStr)
@@ -96,24 +96,24 @@ func TestAPICommentReactions(t *testing.T) {
req := NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
Reaction: "wrong",
})
- resp := session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
//Delete none existing reaction
req = NewRequestWithJSON(t, "DELETE", urlStr, &api.EditReactionOption{
Reaction: "eyes",
})
- resp = session.MakeRequest(t, req, http.StatusOK)
+ session.MakeRequest(t, req, http.StatusOK)
//Add allowed reaction
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
Reaction: "+1",
})
- resp = session.MakeRequest(t, req, http.StatusCreated)
+ resp := session.MakeRequest(t, req, http.StatusCreated)
var apiNewReaction api.Reaction
DecodeJSON(t, resp, &apiNewReaction)
//Add existing reaction
- resp = session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
//Get end result of reaction list of issue #1
req = NewRequestf(t, "GET", urlStr)