1
1
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:
wxiaoguang
2021-11-16 16:53:21 +08:00
committed by GitHub
parent 23bd7b1211
commit 81926d61db
151 changed files with 1719 additions and 1781 deletions

View File

@@ -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)