mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
Decouple unit test, remove intermediate unittestbridge
package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
23bd7b1211
commit
81926d61db
151 changed files with 1719 additions and 1781 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
|
@ -47,10 +46,10 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
|
|||
defer timeutil.Unset()
|
||||
|
||||
for i, tc := range testCases {
|
||||
user := db.AssertExistsAndLoadBean(t, &User{ID: tc.userID}).(*User)
|
||||
user := unittest.AssertExistsAndLoadBean(t, &User{ID: tc.userID}).(*User)
|
||||
|
||||
doer := &User{ID: tc.doerID}
|
||||
_, err := db.LoadBeanIfExists(doer)
|
||||
_, err := unittest.LoadBeanIfExists(doer)
|
||||
assert.NoError(t, err)
|
||||
if tc.doerID == 0 {
|
||||
doer = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue