1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 15:28:37 +00:00

Fix typo in gitea downloader test and add missing codebase in ToGitServiceType (#33146)

This commit is contained in:
yp05327
2025-01-09 03:34:53 +09:00
committed by GitHub
parent 9c00e065a1
commit e177239529
3 changed files with 13 additions and 3 deletions

View File

@@ -21,6 +21,8 @@ func TestToGitServiceType(t *testing.T) {
typ string
enum int
}{{
typ: "trash", enum: 1,
}, {
typ: "github", enum: 2,
}, {
typ: "gitea", enum: 3,
@@ -29,7 +31,13 @@ func TestToGitServiceType(t *testing.T) {
}, {
typ: "gogs", enum: 5,
}, {
typ: "trash", enum: 1,
typ: "onedev", enum: 6,
}, {
typ: "gitbucket", enum: 7,
}, {
typ: "codebase", enum: 8,
}, {
typ: "codecommit", enum: 9,
}}
for _, test := range tc {
assert.EqualValues(t, test.enum, ToGitServiceType(test.typ))