diff options
Diffstat (limited to 'modules/test/context_tests.go')
-rw-r--r-- | modules/test/context_tests.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/test/context_tests.go b/modules/test/context_tests.go index eb1a54d86f..548e454c8e 100644 --- a/modules/test/context_tests.go +++ b/modules/test/context_tests.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/web/middleware" @@ -55,7 +56,7 @@ func LoadRepo(t *testing.T, ctx *context.Context, repoID int64) { ctx.Repo = &context.Repository{} ctx.Repo.Repository = unittest.AssertExistsAndLoadBean(t, &models.Repository{ID: repoID}).(*models.Repository) var err error - ctx.Repo.Owner, err = models.GetUserByID(ctx.Repo.Repository.OwnerID) + ctx.Repo.Owner, err = user_model.GetUserByID(ctx.Repo.Repository.OwnerID) assert.NoError(t, err) ctx.Repo.RepoLink = ctx.Repo.Repository.Link() ctx.Repo.Permission, err = models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User) @@ -78,7 +79,7 @@ func LoadRepoCommit(t *testing.T, ctx *context.Context) { // LoadUser load a user into a test context. func LoadUser(t *testing.T, ctx *context.Context, userID int64) { - ctx.User = unittest.AssertExistsAndLoadBean(t, &models.User{ID: userID}).(*models.User) + ctx.User = unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: userID}).(*user_model.User) } // LoadGitRepo load a git repo into a test context. Requires that ctx.Repo has |