aboutsummaryrefslogtreecommitdiffstats
path: root/services/gitdiff/gitdiff_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/gitdiff/gitdiff_test.go')
-rw-r--r--services/gitdiff/gitdiff_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go
index 57364ace3e..0d8d60d94f 100644
--- a/services/gitdiff/gitdiff_test.go
+++ b/services/gitdiff/gitdiff_test.go
@@ -13,6 +13,7 @@ import (
"testing"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/highlight"
"code.gitea.io/gitea/modules/json"
@@ -492,10 +493,10 @@ func setupDefaultDiff() *Diff {
}
}
func TestDiff_LoadComments(t *testing.T) {
- assert.NoError(t, models.PrepareTestDatabase())
+ assert.NoError(t, db.PrepareTestDatabase())
- issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 2}).(*models.Issue)
- user := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User)
+ issue := db.AssertExistsAndLoadBean(t, &models.Issue{ID: 2}).(*models.Issue)
+ user := db.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User)
diff := setupDefaultDiff()
assert.NoError(t, diff.LoadComments(issue, user))
assert.Len(t, diff.Files[0].Sections[0].Lines[0].Comments, 2)