1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 02:27:20 +00:00

Improve loadprojects for issue list (#25468)

This commit is contained in:
Lunny Xiao
2023-06-24 23:31:28 +08:00
committed by GitHub
parent 5eeddfde10
commit 083818cb85
7 changed files with 41 additions and 30 deletions

View File

@ -66,8 +66,12 @@ func TestIssueList_LoadAttributes(t *testing.T) {
}
if issue.ID == int64(1) {
assert.Equal(t, int64(400), issue.TotalTrackedTime)
assert.NotNil(t, issue.Project)
} else if issue.ID == int64(2) {
assert.Equal(t, int64(3682), issue.TotalTrackedTime)
assert.Nil(t, issue.Project)
} else {
assert.Nil(t, issue.Project)
}
}
}