diff options
Diffstat (limited to 'internal/db/bundb/relationship_test.go')
-rw-r--r-- | internal/db/bundb/relationship_test.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/internal/db/bundb/relationship_test.go b/internal/db/bundb/relationship_test.go index 63fdb9632..d3f4a31d1 100644 --- a/internal/db/bundb/relationship_test.go +++ b/internal/db/bundb/relationship_test.go @@ -734,7 +734,7 @@ func (suite *RelationshipTestSuite) TestRejectFollowRequestNotExisting() { targetAccount := suite.testAccounts["local_account_2"] err := suite.db.RejectFollowRequest(ctx, account.ID, targetAccount.ID) - suite.ErrorIs(err, db.ErrNoEntries) + suite.NoError(err) } func (suite *RelationshipTestSuite) TestGetAccountFollowRequests() { @@ -836,6 +836,19 @@ func (suite *RelationshipTestSuite) TestGetFollowNotExisting() { suite.Nil(follow) } +func (suite *RelationshipTestSuite) TestDeleteFollow() { + ctx := context.Background() + originAccount := suite.testAccounts["local_account_1"] + targetAccount := suite.testAccounts["admin_account"] + + err := suite.db.DeleteFollow(ctx, originAccount.ID, targetAccount.ID) + suite.NoError(err) + + follow, err := suite.db.GetFollow(ctx, originAccount.ID, targetAccount.ID) + suite.EqualError(err, db.ErrNoEntries.Error()) + suite.Nil(follow) +} + func (suite *RelationshipTestSuite) TestUnfollowRequestExisting() { ctx := context.Background() originAccount := suite.testAccounts["admin_account"] |