mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 00:10:15 +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
|
@ -11,7 +11,7 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/eventsource"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -50,9 +50,9 @@ func TestEventSourceManagerRun(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
user2 := db.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
|
||||
repo1 := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
|
||||
thread5 := db.AssertExistsAndLoadBean(t, &models.Notification{ID: 5}).(*models.Notification)
|
||||
user2 := unittest.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
|
||||
repo1 := unittest.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
|
||||
thread5 := unittest.AssertExistsAndLoadBean(t, &models.Notification{ID: 5}).(*models.Notification)
|
||||
assert.NoError(t, thread5.LoadAttributes())
|
||||
session := loginUser(t, user2.Name)
|
||||
token := getTokenForLoggedInUser(t, session)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue