mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
@@ -33,19 +33,19 @@ func TestAPIIssuesReactions(t *testing.T) {
|
||||
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/reactions?token=%s",
|
||||
owner.Name, issue.Repo.Name, issue.Index, token)
|
||||
|
||||
//Try to add not allowed reaction
|
||||
// Try to add not allowed reaction
|
||||
req := NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
|
||||
Reaction: "wrong",
|
||||
})
|
||||
session.MakeRequest(t, req, http.StatusForbidden)
|
||||
|
||||
//Delete not allowed reaction
|
||||
// Delete not allowed reaction
|
||||
req = NewRequestWithJSON(t, "DELETE", urlStr, &api.EditReactionOption{
|
||||
Reaction: "zzz",
|
||||
})
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
//Add allowed reaction
|
||||
// Add allowed reaction
|
||||
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
|
||||
Reaction: "rocket",
|
||||
})
|
||||
@@ -53,10 +53,10 @@ func TestAPIIssuesReactions(t *testing.T) {
|
||||
var apiNewReaction api.Reaction
|
||||
DecodeJSON(t, resp, &apiNewReaction)
|
||||
|
||||
//Add existing reaction
|
||||
// Add existing reaction
|
||||
session.MakeRequest(t, req, http.StatusForbidden)
|
||||
|
||||
//Get end result of reaction list of issue #1
|
||||
// Get end result of reaction list of issue #1
|
||||
req = NewRequestf(t, "GET", urlStr)
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
var apiReactions []*api.Reaction
|
||||
@@ -93,19 +93,19 @@ func TestAPICommentReactions(t *testing.T) {
|
||||
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/reactions?token=%s",
|
||||
owner.Name, issue.Repo.Name, comment.ID, token)
|
||||
|
||||
//Try to add not allowed reaction
|
||||
// Try to add not allowed reaction
|
||||
req := NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
|
||||
Reaction: "wrong",
|
||||
})
|
||||
session.MakeRequest(t, req, http.StatusForbidden)
|
||||
|
||||
//Delete none existing reaction
|
||||
// Delete none existing reaction
|
||||
req = NewRequestWithJSON(t, "DELETE", urlStr, &api.EditReactionOption{
|
||||
Reaction: "eyes",
|
||||
})
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
//Add allowed reaction
|
||||
// Add allowed reaction
|
||||
req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{
|
||||
Reaction: "+1",
|
||||
})
|
||||
@@ -113,10 +113,10 @@ func TestAPICommentReactions(t *testing.T) {
|
||||
var apiNewReaction api.Reaction
|
||||
DecodeJSON(t, resp, &apiNewReaction)
|
||||
|
||||
//Add existing reaction
|
||||
// Add existing reaction
|
||||
session.MakeRequest(t, req, http.StatusForbidden)
|
||||
|
||||
//Get end result of reaction list of issue #1
|
||||
// Get end result of reaction list of issue #1
|
||||
req = NewRequestf(t, "GET", urlStr)
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
var apiReactions []*api.Reaction
|
||||
|
Reference in New Issue
Block a user