aboutsummaryrefslogtreecommitdiffstats
path: root/models/attachment_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 03:57:58 +0800
committerGitHub <noreply@github.com>2021-11-09 20:57:58 +0100
commit99b2858e628d92bba252be72def409af77af735b (patch)
tree56159cf10b271307911e6f01626c0c3efba789ab /models/attachment_test.go
parentb6b1e716654fec3b16d245ef65cf42e57e1bb5b6 (diff)
downloadgitea-99b2858e628d92bba252be72def409af77af735b.tar.gz
gitea-99b2858e628d92bba252be72def409af77af735b.zip
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
Diffstat (limited to 'models/attachment_test.go')
-rw-r--r--models/attachment_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/models/attachment_test.go b/models/attachment_test.go
index 725d5a40c0..c7f456341c 100644
--- a/models/attachment_test.go
+++ b/models/attachment_test.go
@@ -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 {