aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_notification_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_notification_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_notification_test.go')
-rw-r--r--integrations/api_notification_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/api_notification_test.go b/integrations/api_notification_test.go
index 1c62ee5abf..24d17173ac 100644
--- a/integrations/api_notification_test.go
+++ b/integrations/api_notification_test.go
@@ -66,7 +66,7 @@ func TestAPINotification(t *testing.T) {
// -- GET /notifications/threads/{id} --
// get forbidden
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications/threads/%d?token=%s", 1, token))
- resp = session.MakeRequest(t, req, http.StatusForbidden)
+ session.MakeRequest(t, req, http.StatusForbidden)
// get own
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications/threads/%d?token=%s", thread5.ID, token))
@@ -100,7 +100,7 @@ func TestAPINotification(t *testing.T) {
lastReadAt := "2000-01-01T00%3A50%3A01%2B00%3A00" //946687801 <- only Notification 4 is in this filter ...
req = NewRequest(t, "PUT", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?last_read_at=%s&token=%s", user2.Name, repo1.Name, lastReadAt, token))
- resp = session.MakeRequest(t, req, http.StatusResetContent)
+ session.MakeRequest(t, req, http.StatusResetContent)
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/notifications?status-types=unread&token=%s", token))
resp = session.MakeRequest(t, req, http.StatusOK)
@@ -109,7 +109,7 @@ func TestAPINotification(t *testing.T) {
// -- PATCH /notifications/threads/{id} --
req = NewRequest(t, "PATCH", fmt.Sprintf("/api/v1/notifications/threads/%d?token=%s", thread5.ID, token))
- resp = session.MakeRequest(t, req, http.StatusResetContent)
+ session.MakeRequest(t, req, http.StatusResetContent)
assert.Equal(t, models.NotificationStatusUnread, thread5.Status)
thread5 = unittest.AssertExistsAndLoadBean(t, &models.Notification{ID: 5}).(*models.Notification)