summaryrefslogtreecommitdiff
path: root/internal/api/activitypub/users/repliesget_test.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-11-08 14:32:17 +0000
committerLibravatar GitHub <noreply@github.com>2023-11-08 14:32:17 +0000
commite9e5dc5a40926e5320cb131b035c46b1e1b0bd59 (patch)
tree52edc9fa5742f28e1e5223f51cda628ec1c35a24 /internal/api/activitypub/users/repliesget_test.go
parent[chore]: Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#2338) (diff)
downloadgotosocial-e9e5dc5a40926e5320cb131b035c46b1e1b0bd59.tar.xz
[feature] add support for polls + receiving federated status edits (#2330)
Diffstat (limited to 'internal/api/activitypub/users/repliesget_test.go')
-rw-r--r--internal/api/activitypub/users/repliesget_test.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/internal/api/activitypub/users/repliesget_test.go b/internal/api/activitypub/users/repliesget_test.go
index f81dddadd..26492d8ce 100644
--- a/internal/api/activitypub/users/repliesget_test.go
+++ b/internal/api/activitypub/users/repliesget_test.go
@@ -101,12 +101,6 @@ func (suite *RepliesGetTestSuite) TestGetRepliesNext() {
targetAccount := suite.testAccounts["local_account_1"]
targetStatus := suite.testStatuses["local_account_1_status_1"]
- tc := testrig.NewTestTransportController(&suite.state, testrig.NewMockHTTPClient(nil, "../../../../testrig/media"))
- federator := testrig.NewTestFederator(&suite.state, tc, suite.mediaManager)
- emailSender := testrig.NewEmailSender("../../../../web/template/", nil)
- processor := testrig.NewTestProcessor(&suite.state, federator, emailSender, suite.mediaManager)
- userModule := users.New(processor)
-
// setup request
recorder := httptest.NewRecorder()
ctx, _ := testrig.CreateGinTestContext(recorder, nil)
@@ -132,7 +126,7 @@ func (suite *RepliesGetTestSuite) TestGetRepliesNext() {
}
// trigger the function being tested
- userModule.StatusRepliesGETHandler(ctx)
+ suite.userModule.StatusRepliesGETHandler(ctx)
// check response
suite.EqualValues(http.StatusOK, recorder.Code)
@@ -165,12 +159,6 @@ func (suite *RepliesGetTestSuite) TestGetRepliesLast() {
targetAccount := suite.testAccounts["local_account_1"]
targetStatus := suite.testStatuses["local_account_1_status_1"]
- tc := testrig.NewTestTransportController(&suite.state, testrig.NewMockHTTPClient(nil, "../../../../testrig/media"))
- federator := testrig.NewTestFederator(&suite.state, tc, suite.mediaManager)
- emailSender := testrig.NewEmailSender("../../../../web/template/", nil)
- processor := testrig.NewTestProcessor(&suite.state, federator, emailSender, suite.mediaManager)
- userModule := users.New(processor)
-
// setup request
recorder := httptest.NewRecorder()
ctx, _ := testrig.CreateGinTestContext(recorder, nil)
@@ -196,7 +184,7 @@ func (suite *RepliesGetTestSuite) TestGetRepliesLast() {
}
// trigger the function being tested
- userModule.StatusRepliesGETHandler(ctx)
+ suite.userModule.StatusRepliesGETHandler(ctx)
// check response
suite.EqualValues(http.StatusOK, recorder.Code)