summaryrefslogtreecommitdiffstats
path: root/integrations/api_pull_commits_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/api_pull_commits_test.go')
-rw-r--r--integrations/api_pull_commits_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/api_pull_commits_test.go b/integrations/api_pull_commits_test.go
index 30682d9c14..615589fd12 100644
--- a/integrations/api_pull_commits_test.go
+++ b/integrations/api_pull_commits_test.go
@@ -9,15 +9,16 @@ import (
"testing"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
api "code.gitea.io/gitea/modules/structs"
"github.com/stretchr/testify/assert"
)
func TestAPIPullCommits(t *testing.T) {
defer prepareTestEnv(t)()
- pullIssue := models.AssertExistsAndLoadBean(t, &models.PullRequest{ID: 2}).(*models.PullRequest)
+ pullIssue := db.AssertExistsAndLoadBean(t, &models.PullRequest{ID: 2}).(*models.PullRequest)
assert.NoError(t, pullIssue.LoadIssue())
- repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: pullIssue.HeadRepoID}).(*models.Repository)
+ repo := db.AssertExistsAndLoadBean(t, &models.Repository{ID: pullIssue.HeadRepoID}).(*models.Repository)
session := loginUser(t, "user2")
req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/commits", repo.OwnerName, repo.Name, pullIssue.Index)