mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 01:10:19 +00:00
Use more specific test methods (#24265)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
ac384c4e1d
commit
f1173d6879
41 changed files with 117 additions and 117 deletions
|
@ -37,7 +37,7 @@ func TestIssue_DeleteIssue(t *testing.T) {
|
|||
|
||||
issueIDs, err := issues_model.GetIssueIDsByRepoID(db.DefaultContext, 1)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 5, len(issueIDs))
|
||||
assert.Len(t, issueIDs, 5)
|
||||
|
||||
issue := &issues_model.Issue{
|
||||
RepoID: 1,
|
||||
|
@ -48,7 +48,7 @@ func TestIssue_DeleteIssue(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
issueIDs, err = issues_model.GetIssueIDsByRepoID(db.DefaultContext, 1)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 4, len(issueIDs))
|
||||
assert.Len(t, issueIDs, 4)
|
||||
|
||||
// check attachment removal
|
||||
attachments, err := repo_model.GetAttachmentsByIssueID(db.DefaultContext, 4)
|
||||
|
@ -57,7 +57,7 @@ func TestIssue_DeleteIssue(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
err = deleteIssue(db.DefaultContext, issue)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 2, len(attachments))
|
||||
assert.Len(t, attachments, 2)
|
||||
for i := range attachments {
|
||||
attachment, err := repo_model.GetAttachmentByUUID(db.DefaultContext, attachments[i].UUID)
|
||||
assert.Error(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue