aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_tracked_time_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-11-16 16:53:21 +0800
committerGitHub <noreply@github.com>2021-11-16 16:53:21 +0800
commit81926d61db3dac223a75ea49eab893b25a089587 (patch)
tree627d2f19a008089f3a688e9a94a2cc8d2017afe2 /models/issue_tracked_time_test.go
parent23bd7b1211a80aa3b0dcb60ec4a1c0089ff28dd4 (diff)
downloadgitea-81926d61db3dac223a75ea49eab893b25a089587.tar.gz
gitea-81926d61db3dac223a75ea49eab893b25a089587.zip
Decouple unit test, remove intermediate `unittestbridge` package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/issue_tracked_time_test.go')
-rw-r--r--models/issue_tracked_time_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/issue_tracked_time_test.go b/models/issue_tracked_time_test.go
index 2770065363..9bc9664521 100644
--- a/models/issue_tracked_time_test.go
+++ b/models/issue_tracked_time_test.go
@@ -8,7 +8,6 @@ import (
"testing"
"time"
- "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
)
@@ -29,10 +28,10 @@ func TestAddTime(t *testing.T) {
assert.Equal(t, int64(1), trackedTime.IssueID)
assert.Equal(t, int64(3661), trackedTime.Time)
- tt := db.AssertExistsAndLoadBean(t, &TrackedTime{UserID: 3, IssueID: 1}).(*TrackedTime)
+ tt := unittest.AssertExistsAndLoadBean(t, &TrackedTime{UserID: 3, IssueID: 1}).(*TrackedTime)
assert.Equal(t, int64(3661), tt.Time)
- comment := db.AssertExistsAndLoadBean(t, &Comment{Type: CommentTypeAddTimeManual, PosterID: 3, IssueID: 1}).(*Comment)
+ comment := unittest.AssertExistsAndLoadBean(t, &Comment{Type: CommentTypeAddTimeManual, PosterID: 3, IssueID: 1}).(*Comment)
assert.Equal(t, comment.Content, "1h 1min 1s")
}