mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-03 14:27:02 +09:00
Remove incorrect "db.DefaultContext" usages (#35366)
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
@ -125,11 +124,11 @@ func TestPushCommits_AvatarLink(t *testing.T) {
|
||||
|
||||
assert.Equal(t,
|
||||
"/avatars/ab53a2911ddf9b4817ac01ddcd3d975f?size="+strconv.Itoa(28*setting.Avatar.RenderedSizeFactor),
|
||||
pushCommits.AvatarLink(db.DefaultContext, "user2@example.com"))
|
||||
pushCommits.AvatarLink(t.Context(), "user2@example.com"))
|
||||
|
||||
assert.Equal(t,
|
||||
"/assets/img/avatar_default.png",
|
||||
pushCommits.AvatarLink(db.DefaultContext, "nonexistent@example.com"))
|
||||
pushCommits.AvatarLink(t.Context(), "nonexistent@example.com"))
|
||||
}
|
||||
|
||||
func TestCommitToPushCommit(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user