mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 08:56:14 -06:00
Move webpush.MockSender and noopSender into testrig
This commit is contained in:
parent
d89f3ec8f1
commit
b3aab4f0de
40 changed files with 66 additions and 128 deletions
|
|
@ -37,7 +37,6 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/subscriptions"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/transport"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/webpush"
|
||||
"github.com/superseriousbusiness/gotosocial/testrig"
|
||||
)
|
||||
|
||||
|
|
@ -120,7 +119,7 @@ func (suite *AdminStandardTestSuite) SetupTest() {
|
|||
suite.mediaManager,
|
||||
&suite.state,
|
||||
suite.emailSender,
|
||||
webpush.NewNoopSender(),
|
||||
testrig.NewNoopWebPushSender(),
|
||||
visibility.NewFilter(&suite.state),
|
||||
interaction.NewFilter(&suite.state),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/subscriptions"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/transport"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/webpush"
|
||||
"github.com/superseriousbusiness/gotosocial/testrig"
|
||||
)
|
||||
|
||||
|
|
@ -136,7 +135,7 @@ func (suite *ProcessingStandardTestSuite) SetupTest() {
|
|||
suite.mediaManager,
|
||||
&suite.state,
|
||||
suite.emailSender,
|
||||
webpush.NewNoopSender(),
|
||||
testrig.NewNoopWebPushSender(),
|
||||
visibility.NewFilter(&suite.state),
|
||||
interaction.NewFilter(&suite.state),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/stream"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/webpush"
|
||||
"github.com/superseriousbusiness/gotosocial/testrig"
|
||||
)
|
||||
|
||||
|
|
@ -182,7 +181,7 @@ func (suite *FromClientAPITestSuite) checkStreamed(
|
|||
|
||||
// checkWebPushed asserts that the target account got a single Web Push notification with a given type.
|
||||
func (suite *FromClientAPITestSuite) checkWebPushed(
|
||||
sender *webpush.MockSender,
|
||||
sender *testrig.WebPushMockSender,
|
||||
accountID string,
|
||||
notificationType gtsmodel.NotificationType,
|
||||
) {
|
||||
|
|
@ -195,7 +194,7 @@ func (suite *FromClientAPITestSuite) checkWebPushed(
|
|||
|
||||
// checkNotWebPushed asserts that the target account got no Web Push notifications.
|
||||
func (suite *FromClientAPITestSuite) checkNotWebPushed(
|
||||
sender *webpush.MockSender,
|
||||
sender *testrig.WebPushMockSender,
|
||||
accountID string,
|
||||
) {
|
||||
pushedNotifications := sender.Sent[accountID]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue