mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 23:17:14 -04:00
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
8698458f48
commit
0a7d3ff786
145 changed files with 360 additions and 369 deletions
|
@ -43,7 +43,7 @@ func TestAPIGetTrackedTimes(t *testing.T) {
|
|||
assert.EqualValues(t, issue2.ID, apiTimes[i].IssueID)
|
||||
assert.Equal(t, time.Created.Unix(), apiTimes[i].Created.Unix())
|
||||
assert.Equal(t, time.Time, apiTimes[i].Time)
|
||||
user, err := user_model.GetUserByID(time.UserID)
|
||||
user, err := user_model.GetUserByID(db.DefaultContext, time.UserID)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, user.Name, apiTimes[i].UserName)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue