mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +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:
parent
08507e2760
commit
cc5df26680
97 changed files with 298 additions and 294 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"testing"
|
||||
|
||||
auth_model "code.gitea.io/gitea/models/auth"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
|
@ -44,7 +45,7 @@ func TestAPIIssueSubscriptions(t *testing.T) {
|
|||
|
||||
assert.EqualValues(t, isWatching, wi.Subscribed)
|
||||
assert.EqualValues(t, !isWatching, wi.Ignored)
|
||||
assert.EqualValues(t, issue.APIURL()+"/subscriptions", wi.URL)
|
||||
assert.EqualValues(t, issue.APIURL(db.DefaultContext)+"/subscriptions", wi.URL)
|
||||
assert.EqualValues(t, issue.CreatedUnix, wi.CreatedAt.Unix())
|
||||
assert.EqualValues(t, issueRepo.APIURL(), wi.RepositoryURL)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue