[chore] Inboxes for iri test (#508)

* tidy up some federation tests

* add missing license to following.go

* give zork some followers, as a treat

* test InboxesForIRI

* Go fmt

* update timeline tests
This commit is contained in:
tobi 2022-04-29 15:05:13 +02:00 committed by GitHub
commit 63f84da3e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 247 additions and 110 deletions

View file

@ -23,6 +23,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
type StatusVisibleTestSuite struct {
@ -85,6 +86,8 @@ func (suite *StatusVisibleTestSuite) TestDMNotVisibleIfNotMentioned() {
func (suite *StatusVisibleTestSuite) TestStatusNotVisibleIfNotMutuals() {
ctx := context.Background()
suite.db.DeleteByID(ctx, suite.testFollows["local_account_2_local_account_1"].ID, &gtsmodel.Follow{})
testStatusID := suite.testStatuses["local_account_1_status_4"].ID
testStatus, err := suite.db.GetStatusByID(ctx, testStatusID)
suite.NoError(err)
@ -99,6 +102,8 @@ func (suite *StatusVisibleTestSuite) TestStatusNotVisibleIfNotMutuals() {
func (suite *StatusVisibleTestSuite) TestStatusNotVisibleIfNotFollowing() {
ctx := context.Background()
suite.db.DeleteByID(ctx, suite.testFollows["admin_account_local_account_1"].ID, &gtsmodel.Follow{})
testStatusID := suite.testStatuses["local_account_1_status_5"].ID
testStatus, err := suite.db.GetStatusByID(ctx, testStatusID)
suite.NoError(err)