Move webpush.MockSender and noopSender into testrig

This commit is contained in:
Vyr Cossont 2025-01-23 10:39:46 -08:00
commit b3aab4f0de
40 changed files with 66 additions and 128 deletions

View file

@ -27,7 +27,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/api/client/user"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/state"
"github.com/superseriousbusiness/gotosocial/internal/webpush"
"github.com/superseriousbusiness/gotosocial/testrig"
)
@ -45,7 +44,7 @@ func (suite *EmailChangeTestSuite) TestEmailChangePOST() {
storage := testrig.NewInMemoryStorage()
sentEmails := make(map[string]string)
emailSender := testrig.NewEmailSender("../../../../web/template/", sentEmails)
webPushSender := webpush.NewNoopSender()
webPushSender := testrig.NewNoopWebPushSender()
processor := testrig.NewTestProcessor(state, suite.federator, emailSender, webPushSender, suite.mediaManager)
testrig.StartWorkers(state, processor.Workers())
userModule := user.New(processor)

View file

@ -36,7 +36,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/state"
"github.com/superseriousbusiness/gotosocial/internal/storage"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
"github.com/superseriousbusiness/gotosocial/internal/webpush"
"github.com/superseriousbusiness/gotosocial/testrig"
)
@ -99,7 +98,7 @@ func (suite *UserStandardTestSuite) SetupTest() {
&suite.state,
suite.federator,
testrig.NewEmailSender("../../../../web/template/", nil),
webpush.NewNoopSender(),
testrig.NewNoopWebPushSender(),
suite.mediaManager,
)
suite.userModule = user.New(suite.processor)