mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 20:17:21 +00:00
Decouple unit test code from business code (#17623)
This commit is contained in:
@ -8,11 +8,12 @@ import (
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDeleteOrphanedObjects(t *testing.T) {
|
||||
assert.NoError(t, db.PrepareTestDatabase())
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
countBefore, err := db.GetEngine(db.DefaultContext).Count(&PullRequest{})
|
||||
assert.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user