diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /integrations/api_issue_label_test.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'integrations/api_issue_label_test.go')
-rw-r--r-- | integrations/api_issue_label_test.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/integrations/api_issue_label_test.go b/integrations/api_issue_label_test.go index 42bfedf32f..94b487377e 100644 --- a/integrations/api_issue_label_test.go +++ b/integrations/api_issue_label_test.go @@ -53,21 +53,21 @@ func TestAPIModifyLabels(t *testing.T) { }) session.MakeRequest(t, req, http.StatusUnprocessableEntity) - //ListLabels + // ListLabels req = NewRequest(t, "GET", urlStr) resp = session.MakeRequest(t, req, http.StatusOK) var apiLabels []*api.Label DecodeJSON(t, resp, &apiLabels) assert.Len(t, apiLabels, 2) - //GetLabel + // GetLabel singleURLStr := fmt.Sprintf("/api/v1/repos/%s/%s/labels/%d?token=%s", owner.Name, repo.Name, dbLabel.ID, token) req = NewRequest(t, "GET", singleURLStr) resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &apiLabel) assert.EqualValues(t, strings.TrimLeft(dbLabel.Color, "#"), apiLabel.Color) - //EditLabel + // EditLabel newName := "LabelNewName" newColor := "09876a" newColorWrong := "09g76a" @@ -83,10 +83,9 @@ func TestAPIModifyLabels(t *testing.T) { }) session.MakeRequest(t, req, http.StatusUnprocessableEntity) - //DeleteLabel + // DeleteLabel req = NewRequest(t, "DELETE", singleURLStr) session.MakeRequest(t, req, http.StatusNoContent) - } func TestAPIAddIssueLabels(t *testing.T) { @@ -173,21 +172,21 @@ func TestAPIModifyOrgLabels(t *testing.T) { }) session.MakeRequest(t, req, http.StatusUnprocessableEntity) - //ListLabels + // ListLabels req = NewRequest(t, "GET", urlStr) resp = session.MakeRequest(t, req, http.StatusOK) var apiLabels []*api.Label DecodeJSON(t, resp, &apiLabels) assert.Len(t, apiLabels, 4) - //GetLabel + // GetLabel singleURLStr := fmt.Sprintf("/api/v1/orgs/%s/labels/%d?token=%s", owner.Name, dbLabel.ID, token) req = NewRequest(t, "GET", singleURLStr) resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &apiLabel) assert.EqualValues(t, strings.TrimLeft(dbLabel.Color, "#"), apiLabel.Color) - //EditLabel + // EditLabel newName := "LabelNewName" newColor := "09876a" newColorWrong := "09g76a" @@ -203,8 +202,7 @@ func TestAPIModifyOrgLabels(t *testing.T) { }) session.MakeRequest(t, req, http.StatusUnprocessableEntity) - //DeleteLabel + // DeleteLabel req = NewRequest(t, "DELETE", singleURLStr) session.MakeRequest(t, req, http.StatusNoContent) - } |