[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
parent f9b351438b
commit 63f84da3e4
11 changed files with 247 additions and 110 deletions

View File

@@ -16,6 +16,7 @@
package status_test
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -29,6 +30,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/api/client/status"
"github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
)
@@ -144,6 +146,10 @@ func (suite *StatusBoostTestSuite) TestPostUnboostable() {
// try to boost a status that's not visible to the user
func (suite *StatusBoostTestSuite) TestPostNotVisible() {
// stop local_account_2 following zork
err := suite.db.DeleteByID(context.Background(), suite.testFollows["local_account_2_local_account_1"].ID, &gtsmodel.Follow{})
suite.NoError(err)
t := suite.testTokens["local_account_2"]
oauthToken := oauth.DBTokenToToken(t)