mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Even more db.DefaultContext
refactor (#27352)
Part of #27065 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
@@ -65,7 +65,7 @@ func TestIssueAPIURL(t *testing.T) {
|
||||
err := issue.LoadAttributes(db.DefaultContext)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/issues/1", issue.APIURL())
|
||||
assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/issues/1", issue.APIURL(db.DefaultContext))
|
||||
}
|
||||
|
||||
func TestGetIssuesByIDs(t *testing.T) {
|
||||
@@ -477,7 +477,7 @@ func assertCreateIssues(t *testing.T, isPull bool) {
|
||||
Labels: []*issues_model.Label{label},
|
||||
Reactions: []*issues_model.Reaction{reaction},
|
||||
}
|
||||
err := issues_model.InsertIssues(is)
|
||||
err := issues_model.InsertIssues(db.DefaultContext, is)
|
||||
assert.NoError(t, err)
|
||||
|
||||
i := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{Title: title})
|
||||
|
Reference in New Issue
Block a user