1
0
Fork 0
forked from forgejo/forgejo

Refactored and fixed migration tests. (#16714)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
KN4CK3R 2021-08-18 02:47:18 +02:00 committed by GitHub
parent 65c6acccf6
commit 422c30d315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 744 additions and 485 deletions

View file

@ -70,7 +70,7 @@ func TestGiteaUploadRepo(t *testing.T) {
labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{})
assert.NoError(t, err)
assert.Len(t, labels, 11)
assert.Len(t, labels, 12)
releases, err := models.GetReleasesByRepoID(repo.ID, models.FindReleasesOptions{
ListOptions: models.ListOptions{
@ -98,7 +98,7 @@ func TestGiteaUploadRepo(t *testing.T) {
SortType: "oldest",
})
assert.NoError(t, err)
assert.Len(t, issues, 14)
assert.Len(t, issues, 15)
assert.NoError(t, issues[0].LoadDiscussComments())
assert.Empty(t, issues[0].Comments)
@ -106,7 +106,7 @@ func TestGiteaUploadRepo(t *testing.T) {
SortType: "oldest",
})
assert.NoError(t, err)
assert.Len(t, pulls, 34)
assert.Len(t, pulls, 30)
assert.NoError(t, pulls[0].LoadIssue())
assert.NoError(t, pulls[0].Issue.LoadDiscussComments())
assert.Len(t, pulls[0].Issue.Comments, 2)