diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-11-12 15:36:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 15:36:47 +0100 |
commit | df64fa486555de6f403a795fd16c2e9e1d59e535 (patch) | |
tree | b899e9b9e5d57409b1bf0e3afbd606b6a3900235 /services/mailer/mail_test.go | |
parent | Fix some incorrect async functions, improve frontend document. (#17597) (diff) | |
download | forgejo-df64fa486555de6f403a795fd16c2e9e1d59e535.tar.xz forgejo-df64fa486555de6f403a795fd16c2e9e1d59e535.zip |
Decouple unit test code from business code (#17623)
Diffstat (limited to 'services/mailer/mail_test.go')
-rw-r--r-- | services/mailer/mail_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go index cd730a13a4..aaa18681b8 100644 --- a/services/mailer/mail_test.go +++ b/services/mailer/mail_test.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" @@ -41,7 +42,7 @@ const bodyTpl = ` ` func prepareMailerTest(t *testing.T) (doer *models.User, repo *models.Repository, issue *models.Issue, comment *models.Comment) { - assert.NoError(t, db.PrepareTestDatabase()) + assert.NoError(t, unittest.PrepareTestDatabase()) var mailService = setting.Mailer{ From: "test@gitea.com", } |