0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-23 21:33:19 +01:00
This commit is contained in:
Lunny Xiao 2026-02-19 13:08:06 -08:00
parent 52785eff52
commit 5fd70c971f
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -73,7 +73,7 @@ func TestCreatePushPullCommentForcePushDeletesOldComments(t *testing.T) {
// typically return no commits, so only the force-push comment is expected.
commits, err := gitRepo.CommitsBetweenNotBase(headCommit, oldCommit, pr.BaseBranch)
assert.NoError(t, err)
assert.Len(t, commits, 0)
assert.Empty(t, commits)
comments, err = issues_model.FindComments(t.Context(), &issues_model.FindCommentsOptions{
IssueID: pr.IssueID,
@ -150,7 +150,7 @@ func TestCreatePushPullCommentForcePushDeletesOldComments(t *testing.T) {
assert.NoError(t, err)
// For this scenario we expect at least one commit between head and base
// that is not on the base branch, so data.CommitIDs should be non-empty.
assert.Greater(t, len(commits), 0)
assert.NotEmpty(t, commits)
comments, err = issues_model.FindComments(t.Context(), &issues_model.FindCommentsOptions{
IssueID: pr.IssueID,