aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_tracked_time_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-08 17:11:15 +0800
committerGitHub <noreply@github.com>2022-04-08 17:11:15 +0800
commit1dfa26e00e8e1ce6f6125335871da1d402a63466 (patch)
treed39414fb085ae52d6633ae9d064aabab2e7f75f8 /integrations/api_issue_tracked_time_test.go
parent84ceaa98bd731431c7d3a7f65e59e7ad076a540f (diff)
downloadgitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.tar.gz
gitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.zip
Move milestone to models/issues/ (#19278)
* Move milestone to models/issues/ * Fix lint * Fix test * Fix lint * Fix lint
Diffstat (limited to 'integrations/api_issue_tracked_time_test.go')
-rw-r--r--integrations/api_issue_tracked_time_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/integrations/api_issue_tracked_time_test.go b/integrations/api_issue_tracked_time_test.go
index 335fd2929a..b6f7091013 100644
--- a/integrations/api_issue_tracked_time_test.go
+++ b/integrations/api_issue_tracked_time_test.go
@@ -11,6 +11,7 @@ import (
"time"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
@@ -23,7 +24,7 @@ func TestAPIGetTrackedTimes(t *testing.T) {
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User)
issue2 := unittest.AssertExistsAndLoadBean(t, &models.Issue{ID: 2}).(*models.Issue)
- assert.NoError(t, issue2.LoadRepo())
+ assert.NoError(t, issue2.LoadRepo(db.DefaultContext))
session := loginUser(t, user2.Name)
token := getTokenForLoggedInUser(t, session)
@@ -65,7 +66,7 @@ func TestAPIDeleteTrackedTime(t *testing.T) {
time6 := unittest.AssertExistsAndLoadBean(t, &models.TrackedTime{ID: 6}).(*models.TrackedTime)
issue2 := unittest.AssertExistsAndLoadBean(t, &models.Issue{ID: 2}).(*models.Issue)
- assert.NoError(t, issue2.LoadRepo())
+ assert.NoError(t, issue2.LoadRepo(db.DefaultContext))
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User)
session := loginUser(t, user2.Name)
@@ -99,7 +100,7 @@ func TestAPIAddTrackedTimes(t *testing.T) {
defer prepareTestEnv(t)()
issue2 := unittest.AssertExistsAndLoadBean(t, &models.Issue{ID: 2}).(*models.Issue)
- assert.NoError(t, issue2.LoadRepo())
+ assert.NoError(t, issue2.LoadRepo(db.DefaultContext))
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User)
admin := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}).(*user_model.User)