1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-12 13:37:20 +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

@ -9,7 +9,7 @@ import (
"testing"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
)
@ -39,6 +39,6 @@ func TestRenameBranch(t *testing.T) {
assert.Equal(t, "/user2/repo1/src/branch/main/README.md", location)
// check db
repo1 := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
repo1 := unittest.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)
assert.Equal(t, "main", repo1.DefaultBranch)
}