mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-08 07:03:15 -06:00
use noop email sender in tests
This commit is contained in:
parent
b0cc815189
commit
8fdb3256e5
23 changed files with 110 additions and 88 deletions
|
|
@ -31,6 +31,7 @@ type AccountStandardTestSuite struct {
|
|||
federator federation.Federator
|
||||
processor processing.Processor
|
||||
emailSender email.Sender
|
||||
sentEmails map[string]string
|
||||
|
||||
// standard suite models
|
||||
testTokens map[string]*gtsmodel.Token
|
||||
|
|
@ -61,7 +62,8 @@ func (suite *AccountStandardTestSuite) SetupTest() {
|
|||
suite.storage = testrig.NewTestStorage()
|
||||
testrig.InitTestLog()
|
||||
suite.federator = testrig.NewTestFederator(suite.db, testrig.NewTestTransportController(testrig.NewMockHTTPClient(nil), suite.db), suite.storage)
|
||||
suite.emailSender = testrig.NewEmailSender("../../../../web/template/")
|
||||
suite.sentEmails = make(map[string]string)
|
||||
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", suite.sentEmails)
|
||||
suite.processor = testrig.NewTestProcessor(suite.db, suite.storage, suite.federator, suite.emailSender)
|
||||
suite.accountModule = account.New(suite.config, suite.processor).(*account.Module)
|
||||
testrig.StandardDBSetup(suite.db, nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue