mirror of
https://github.com/go-gitea/gitea
synced 2025-11-06 06:18:12 +00:00
Decouple unit test, remove intermediate unittestbridge package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ func TestGiteaUploadRepo(t *testing.T) {
|
||||
|
||||
unittest.PrepareTestEnv(t)
|
||||
|
||||
user := db.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User)
|
||||
user := unittest.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User)
|
||||
|
||||
var (
|
||||
downloader = NewGithubDownloaderV3(context.Background(), "https://github.com", "", "", "", "go-xorm", "builder")
|
||||
@@ -52,7 +52,7 @@ func TestGiteaUploadRepo(t *testing.T) {
|
||||
}, nil)
|
||||
assert.NoError(t, err)
|
||||
|
||||
repo := db.AssertExistsAndLoadBean(t, &models.Repository{OwnerID: user.ID, Name: repoName}).(*models.Repository)
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &models.Repository{OwnerID: user.ID, Name: repoName}).(*models.Repository)
|
||||
assert.True(t, repo.HasWiki())
|
||||
assert.EqualValues(t, models.RepositoryReady, repo.Status)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user