mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-01 19:23:16 -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
|
|
@ -50,6 +50,7 @@ type AccountStandardTestSuite struct {
|
|||
transportController transport.Controller
|
||||
federator federation.Federator
|
||||
emailSender email.Sender
|
||||
sentEmails map[string]string
|
||||
|
||||
// standard suite models
|
||||
testTokens map[string]*gtsmodel.Token
|
||||
|
|
@ -86,7 +87,8 @@ func (suite *AccountStandardTestSuite) SetupTest() {
|
|||
suite.httpClient = testrig.NewMockHTTPClient(nil)
|
||||
suite.transportController = testrig.NewTestTransportController(suite.httpClient, suite.db)
|
||||
suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage)
|
||||
suite.emailSender = testrig.NewEmailSender("../../../web/template/")
|
||||
suite.sentEmails = make(map[string]string)
|
||||
suite.emailSender = testrig.NewEmailSender("../../../web/template/", suite.sentEmails)
|
||||
suite.accountProcessor = account.New(suite.db, suite.tc, suite.mediaHandler, suite.oauthServer, suite.fromClientAPIChan, suite.federator, suite.config)
|
||||
testrig.StandardDBSetup(suite.db, nil)
|
||||
testrig.StandardStorageSetup(suite.storage, "../../../testrig/media")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue