aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_list_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_list_test.go')
-rw-r--r--models/issue_list_test.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/models/issue_list_test.go b/models/issue_list_test.go
index ea2f42e77b..2916a7302f 100644
--- a/models/issue_list_test.go
+++ b/models/issue_list_test.go
@@ -7,7 +7,6 @@ package models
import (
"testing"
- "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/setting"
@@ -18,9 +17,9 @@ func TestIssueList_LoadRepositories(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
issueList := IssueList{
- db.AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
- db.AssertExistsAndLoadBean(t, &Issue{ID: 2}).(*Issue),
- db.AssertExistsAndLoadBean(t, &Issue{ID: 4}).(*Issue),
+ unittest.AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
+ unittest.AssertExistsAndLoadBean(t, &Issue{ID: 2}).(*Issue),
+ unittest.AssertExistsAndLoadBean(t, &Issue{ID: 4}).(*Issue),
}
repos, err := issueList.LoadRepositories()
@@ -35,8 +34,8 @@ func TestIssueList_LoadAttributes(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
setting.Service.EnableTimetracking = true
issueList := IssueList{
- db.AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
- db.AssertExistsAndLoadBean(t, &Issue{ID: 4}).(*Issue),
+ unittest.AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
+ unittest.AssertExistsAndLoadBean(t, &Issue{ID: 4}).(*Issue),
}
assert.NoError(t, issueList.LoadAttributes())
@@ -44,7 +43,7 @@ func TestIssueList_LoadAttributes(t *testing.T) {
assert.EqualValues(t, issue.RepoID, issue.Repo.ID)
for _, label := range issue.Labels {
assert.EqualValues(t, issue.RepoID, label.RepoID)
- db.AssertExistsAndLoadBean(t, &IssueLabel{IssueID: issue.ID, LabelID: label.ID})
+ unittest.AssertExistsAndLoadBean(t, &IssueLabel{IssueID: issue.ID, LabelID: label.ID})
}
if issue.PosterID > 0 {
assert.EqualValues(t, issue.PosterID, issue.Poster.ID)