forked from forgejo/forgejo
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
|
@ -85,7 +85,7 @@ func TestAPIListIssueComments(t *testing.T) {
|
|||
DecodeJSON(t, resp, &comments)
|
||||
expectedCount := unittest.GetCount(t, &issues_model.Comment{IssueID: issue.ID},
|
||||
unittest.Cond("type = ?", issues_model.CommentTypeComment))
|
||||
assert.EqualValues(t, expectedCount, len(comments))
|
||||
assert.Len(t, comments, expectedCount)
|
||||
}
|
||||
|
||||
func TestAPICreateComment(t *testing.T) {
|
||||
|
@ -196,5 +196,5 @@ func TestAPIListIssueTimeline(t *testing.T) {
|
|||
var comments []*api.TimelineComment
|
||||
DecodeJSON(t, resp, &comments)
|
||||
expectedCount := unittest.GetCount(t, &issues_model.Comment{IssueID: issue.ID})
|
||||
assert.EqualValues(t, expectedCount, len(comments))
|
||||
assert.Len(t, comments, expectedCount)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue