summaryrefslogtreecommitdiffstats
path: root/models/issue_list_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_list_test.go')
-rw-r--r--models/issue_list_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/models/issue_list_test.go b/models/issue_list_test.go
index 958e074662..9197e0615a 100644
--- a/models/issue_list_test.go
+++ b/models/issue_list_test.go
@@ -7,6 +7,8 @@ package models
import (
"testing"
+ "code.gitea.io/gitea/modules/setting"
+
"github.com/stretchr/testify/assert"
)
@@ -29,7 +31,7 @@ func TestIssueList_LoadRepositories(t *testing.T) {
func TestIssueList_LoadAttributes(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
-
+ setting.Service.EnableTimetracking = true
issueList := IssueList{
AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
AssertExistsAndLoadBean(t, &Issue{ID: 2}).(*Issue),
@@ -61,5 +63,10 @@ func TestIssueList_LoadAttributes(t *testing.T) {
for _, comment := range issue.Comments {
assert.EqualValues(t, issue.ID, comment.IssueID)
}
+ if issue.ID == int64(1) {
+ assert.Equal(t, int64(400), issue.TotalTrackedTime)
+ } else if issue.ID == int64(2) {
+ assert.Equal(t, int64(3662), issue.TotalTrackedTime)
+ }
}
}