forked from forgejo/forgejo
Refactored and fixed migration tests. (#16714)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
65c6acccf6
commit
422c30d315
10 changed files with 744 additions and 485 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue