aboutsummaryrefslogtreecommitdiffstats
path: root/modules/convert/pull_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/convert/pull_test.go')
-rw-r--r--modules/convert/pull_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/convert/pull_test.go b/modules/convert/pull_test.go
index a6ccbaca58..a0a672d3a5 100644
--- a/modules/convert/pull_test.go
+++ b/modules/convert/pull_test.go
@@ -7,6 +7,7 @@ package convert
import (
"testing"
+ "code.gitea.io/gitea/models/db"
issues_model "code.gitea.io/gitea/models/issues"
"code.gitea.io/gitea/models/perm"
repo_model "code.gitea.io/gitea/models/repo"
@@ -22,8 +23,8 @@ func TestPullRequest_APIFormat(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
headRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 1})
- assert.NoError(t, pr.LoadAttributes())
- assert.NoError(t, pr.LoadIssue())
+ assert.NoError(t, pr.LoadAttributes(db.DefaultContext))
+ assert.NoError(t, pr.LoadIssue(db.DefaultContext))
apiPullRequest := ToAPIPullRequest(git.DefaultContext, pr, nil)
assert.NotNil(t, apiPullRequest)
assert.EqualValues(t, &structs.PRBranchInfo{
@@ -36,8 +37,8 @@ func TestPullRequest_APIFormat(t *testing.T) {
// withOut HeadRepo
pr = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 1})
- assert.NoError(t, pr.LoadIssue())
- assert.NoError(t, pr.LoadAttributes())
+ assert.NoError(t, pr.LoadIssue(db.DefaultContext))
+ assert.NoError(t, pr.LoadAttributes(db.DefaultContext))
// simulate fork deletion
pr.HeadRepo = nil
pr.HeadRepoID = 100000