summaryrefslogtreecommitdiffstats
path: root/services/mailer/mail_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-11-12 15:36:47 +0100
committerGitHub <noreply@github.com>2021-11-12 15:36:47 +0100
commitdf64fa486555de6f403a795fd16c2e9e1d59e535 (patch)
treeb899e9b9e5d57409b1bf0e3afbd606b6a3900235 /services/mailer/mail_test.go
parentFix some incorrect async functions, improve frontend document. (#17597) (diff)
downloadforgejo-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.go3
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",
}