Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
This commit is contained in:
parent
b6b1e71665
commit
99b2858e62
68 changed files with 556 additions and 491 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unit"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -107,11 +108,11 @@ func TestLinkedRepository(t *testing.T) {
|
|||
name string
|
||||
attachID int64
|
||||
expectedRepo *Repository
|
||||
expectedUnitType UnitType
|
||||
expectedUnitType unit.Type
|
||||
}{
|
||||
{"LinkedIssue", 1, &Repository{ID: 1}, UnitTypeIssues},
|
||||
{"LinkedComment", 3, &Repository{ID: 1}, UnitTypePullRequests},
|
||||
{"LinkedRelease", 9, &Repository{ID: 1}, UnitTypeReleases},
|
||||
{"LinkedIssue", 1, &Repository{ID: 1}, unit.TypeIssues},
|
||||
{"LinkedComment", 3, &Repository{ID: 1}, unit.TypePullRequests},
|
||||
{"LinkedRelease", 9, &Repository{ID: 1}, unit.TypeReleases},
|
||||
{"Notlinked", 10, nil, -1},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue