diff options
Diffstat (limited to 'internal/db/bundb/relationship_test.go')
| -rw-r--r-- | internal/db/bundb/relationship_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/db/bundb/relationship_test.go b/internal/db/bundb/relationship_test.go index 1d47db6a7..a8b456286 100644 --- a/internal/db/bundb/relationship_test.go +++ b/internal/db/bundb/relationship_test.go @@ -803,6 +803,27 @@ func (suite *RelationshipTestSuite) TestGetAccountFollowRequests() { suite.Len(followRequests, 1) } +func (suite *RelationshipTestSuite) TestGetAccountFollowRequesting() { + ctx := suite.T().Context() + account := suite.testAccounts["admin_account"] + targetAccount := suite.testAccounts["local_account_2"] + + followRequest := >smodel.FollowRequest{ + ID: "01GEF753FWHCHRDWR0QEHBXM8W", + URI: "http://localhost:8080/weeeeeeeeeeeeeeeee", + AccountID: account.ID, + TargetAccountID: targetAccount.ID, + } + + if err := suite.db.Put(ctx, followRequest); err != nil { + suite.FailNow(err.Error()) + } + + followRequests, err := suite.db.GetAccountFollowRequesting(ctx, account.ID, nil) + suite.NoError(err) + suite.Len(followRequests, 1) +} + func (suite *RelationshipTestSuite) TestGetAccountFollows() { account := suite.testAccounts["local_account_1"] follows, err := suite.db.GetAccountFollows(suite.T().Context(), account.ID, nil) |
