1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Enable testifylint rules (#34075)

enable testifylint rules disabled in:
https://github.com/go-gitea/gitea/pull/34054
This commit is contained in:
TheFox0x7
2025-03-31 07:53:48 +02:00
committed by GitHub
parent 0fd5392087
commit 0fde8ecd55
262 changed files with 1315 additions and 1365 deletions

View File

@@ -97,7 +97,7 @@ func createNewReleaseUsingAPI(t *testing.T, token string, owner *user_model.User
Title: newRelease.Title,
}
unittest.AssertExistsAndLoadBean(t, rel)
assert.EqualValues(t, newRelease.Note, rel.Note)
assert.Equal(t, newRelease.Note, rel.Note)
return &newRelease
}
@@ -151,7 +151,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) {
Title: newRelease.Title,
}
unittest.AssertExistsAndLoadBean(t, rel)
assert.EqualValues(t, rel.Note, newRelease.Note)
assert.Equal(t, rel.Note, newRelease.Note)
}
func TestAPICreateProtectedTagRelease(t *testing.T) {
@@ -329,7 +329,7 @@ func TestAPIUploadAssetRelease(t *testing.T) {
var attachment *api.Attachment
DecodeJSON(t, resp, &attachment)
assert.EqualValues(t, filename, attachment.Name)
assert.Equal(t, filename, attachment.Name)
assert.EqualValues(t, 104, attachment.Size)
req = NewRequestWithBody(t, http.MethodPost, assetURL+"?name=test-asset", bytes.NewReader(body.Bytes())).
@@ -340,7 +340,7 @@ func TestAPIUploadAssetRelease(t *testing.T) {
var attachment2 *api.Attachment
DecodeJSON(t, resp, &attachment2)
assert.EqualValues(t, "test-asset", attachment2.Name)
assert.Equal(t, "test-asset", attachment2.Name)
assert.EqualValues(t, 104, attachment2.Size)
})
@@ -358,7 +358,7 @@ func TestAPIUploadAssetRelease(t *testing.T) {
var attachment *api.Attachment
DecodeJSON(t, resp, &attachment)
assert.EqualValues(t, "stream.bin", attachment.Name)
assert.Equal(t, "stream.bin", attachment.Name)
assert.EqualValues(t, 104, attachment.Size)
})
}