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

Fetch all review ids at once

Add unit tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz
2018-05-11 20:28:44 +02:00
parent 9c6bb4b1e9
commit bc9359222a
4 changed files with 38 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ func TestReview_LoadAttributes(t *testing.T) {
func TestReview_LoadCodeComments(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
review := AssertExistsAndLoadBean(t, &Review{ID: 1}).(*Review)
review := AssertExistsAndLoadBean(t, &Review{ID: 4}).(*Review)
assert.NoError(t, review.LoadCodeComments())
assert.Len(t, review.CodeComments, 1)
assert.Equal(t, int64(4), review.CodeComments[0].Line)