add email sender to processor

This commit is contained in:
tsmethurst 2021-10-17 10:50:57 +02:00
commit 5f6a0cd8cf
25 changed files with 139 additions and 220 deletions

View file

@ -49,7 +49,8 @@ func (suite *RepliesGetTestSuite) TestGetReplies() {
tc := testrig.NewTestTransportController(testrig.NewMockHTTPClient(nil), suite.db)
federator := testrig.NewTestFederator(suite.db, tc, suite.storage)
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator)
emailSender := testrig.NewEmailSender("../../../../web/template/")
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator, emailSender)
userModule := user.New(suite.config, processor).(*user.Module)
// setup request
@ -108,7 +109,8 @@ func (suite *RepliesGetTestSuite) TestGetRepliesNext() {
tc := testrig.NewTestTransportController(testrig.NewMockHTTPClient(nil), suite.db)
federator := testrig.NewTestFederator(suite.db, tc, suite.storage)
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator)
emailSender := testrig.NewEmailSender("../../../../web/template/")
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator, emailSender)
userModule := user.New(suite.config, processor).(*user.Module)
// setup request
@ -170,7 +172,8 @@ func (suite *RepliesGetTestSuite) TestGetRepliesLast() {
tc := testrig.NewTestTransportController(testrig.NewMockHTTPClient(nil), suite.db)
federator := testrig.NewTestFederator(suite.db, tc, suite.storage)
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator)
emailSender := testrig.NewEmailSender("../../../../web/template/")
processor := testrig.NewTestProcessor(suite.db, suite.storage, federator, emailSender)
userModule := user.New(suite.config, processor).(*user.Module)
// setup request