aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrate_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrate_test.go')
-rw-r--r--models/migrate_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/models/migrate_test.go b/models/migrate_test.go
index 6da434d76a..ce28b3ca7c 100644
--- a/models/migrate_test.go
+++ b/models/migrate_test.go
@@ -8,6 +8,7 @@ import (
"strconv"
"testing"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/foreignreference"
issues_model "code.gitea.io/gitea/models/issues"
repo_model "code.gitea.io/gitea/models/repo"
@@ -22,7 +23,7 @@ func TestMigrate_InsertMilestones(t *testing.T) {
reponame := "repo1"
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: reponame}).(*repo_model.Repository)
name := "milestonetest1"
- ms := &Milestone{
+ ms := &issues_model.Milestone{
RepoID: repo.ID,
Name: name,
}
@@ -32,7 +33,7 @@ func TestMigrate_InsertMilestones(t *testing.T) {
repoModified := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: repo.ID}).(*repo_model.Repository)
assert.EqualValues(t, repo.NumMilestones+1, repoModified.NumMilestones)
- unittest.CheckConsistencyFor(t, &Milestone{})
+ unittest.CheckConsistencyFor(t, &issues_model.Milestone{})
}
func assertCreateIssues(t *testing.T, isPull bool) {
@@ -41,7 +42,7 @@ func assertCreateIssues(t *testing.T, isPull bool) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: reponame}).(*repo_model.Repository)
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}).(*user_model.User)
label := unittest.AssertExistsAndLoadBean(t, &Label{ID: 1}).(*Label)
- milestone := unittest.AssertExistsAndLoadBean(t, &Milestone{ID: 1}).(*Milestone)
+ milestone := unittest.AssertExistsAndLoadBean(t, &issues_model.Milestone{ID: 1}).(*issues_model.Milestone)
assert.EqualValues(t, milestone.ID, 1)
reaction := &issues_model.Reaction{
Type: "heart",
@@ -90,7 +91,7 @@ func TestMigrate_CreateIssuesIsPullTrue(t *testing.T) {
func TestMigrate_InsertIssueComments(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
issue := unittest.AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue)
- _ = issue.LoadRepo()
+ _ = issue.LoadRepo(db.DefaultContext)
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: issue.Repo.OwnerID}).(*user_model.User)
reaction := &issues_model.Reaction{
Type: "heart",