mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 03:03:16 -06:00
go fmt
This commit is contained in:
parent
515c29d7e2
commit
c375b01152
1 changed files with 9 additions and 9 deletions
|
|
@ -36,9 +36,9 @@ type RejectTestSuite struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *RejectTestSuite) TestRejectFollowRequest() {
|
func (suite *RejectTestSuite) TestRejectFollowRequest() {
|
||||||
// local_account_1 sent a follow request to remote_account_2;
|
// local_account_1 sent a follow request to remote_account_2;
|
||||||
// remote_account_2 rejects the follow request
|
// remote_account_2 rejects the follow request
|
||||||
followingAccount := suite.testAccounts["local_account_1"]
|
followingAccount := suite.testAccounts["local_account_1"]
|
||||||
followedAccount := suite.testAccounts["remote_account_2"]
|
followedAccount := suite.testAccounts["remote_account_2"]
|
||||||
fromFederatorChan := make(chan messages.FromFederator, 10)
|
fromFederatorChan := make(chan messages.FromFederator, 10)
|
||||||
ctx := createTestContext(followingAccount, followedAccount, fromFederatorChan)
|
ctx := createTestContext(followingAccount, followedAccount, fromFederatorChan)
|
||||||
|
|
@ -79,16 +79,16 @@ func (suite *RejectTestSuite) TestRejectFollowRequest() {
|
||||||
acceptTo.AppendIRI(requestingAccountURI)
|
acceptTo.AppendIRI(requestingAccountURI)
|
||||||
reject.SetActivityStreamsTo(acceptTo)
|
reject.SetActivityStreamsTo(acceptTo)
|
||||||
|
|
||||||
// process the reject in the federating database
|
// process the reject in the federating database
|
||||||
err = suite.federatingDB.Reject(ctx, reject)
|
err = suite.federatingDB.Reject(ctx, reject)
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
||||||
// there should be nothing in the federator channel since nothing needs to be passed
|
// there should be nothing in the federator channel since nothing needs to be passed
|
||||||
suite.Empty(fromFederatorChan)
|
suite.Empty(fromFederatorChan)
|
||||||
|
|
||||||
// the follow request should not be in the database anymore -- it's been rejected
|
// the follow request should not be in the database anymore -- it's been rejected
|
||||||
err = suite.db.GetByID(ctx, fr.ID, >smodel.FollowRequest{})
|
err = suite.db.GetByID(ctx, fr.ID, >smodel.FollowRequest{})
|
||||||
suite.ErrorIs(err, db.ErrNoEntries)
|
suite.ErrorIs(err, db.ErrNoEntries)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRejectTestSuite(t *testing.T) {
|
func TestRejectTestSuite(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue